+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Problem when loading map (/thread-6771.html)
void SetEntityConnectionStateChangeCallback(leverbooks_01, OnLeverStateChange);
//===========================================
// This runs when the player enters the map
void OnEnter()
{
}
//===========================================
// This runs when the player leaves the map
void OnLeave()
{
StopMusic(0.5f, 1);
}
RE: Problem when loading map - Oscar House - 03-02-2011
void SetEntityConnectionStateChangeCallback(leverbooks_01, OnLeverStateChange);
//===========================================
// This runs when the player enters the map
void OnEnter()
{
}
//===========================================
// This runs when the player leaves the map
void OnLeave()
{
StopMusic(0.5f, 1);
}
You shouldn't put it as a function, instead place it inside Onstart(), like this:
//===========================================
// This runs when the player enters the map
void OnEnter()
{
}
//===========================================
// This runs when the player leaves the map
void OnLeave()
{
StopMusic(0.5f, 1);
}
You also missed some quotation marks and a semicolon from there, I added those as well. See how it works, though I suspect there might still be something I missed.
RE: Problem when loading map - Viperdream - 03-02-2011
if(alState == 1){
SetLeverStuckState(asEntity, 1, true);
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0, false);
PlayMusic("010_puzzle01.ogg", false, 1.0f, 4.0f, 3, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0, false);
}
}
void Collide_Area(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("note_letter_1", true); //makes letter appear on the floor near the door
}
//===========================================
// This runs when the player enters the map
void OnEnter()
{
}
//===========================================
// This runs when the player leaves the map
void OnLeave()
{
StopMusic(0.5f, 1);
}
Specifically, in-game - what works and what doesn't work?
RE: Problem when loading map - Viperdream - 03-04-2011
Everything in the script works. Except for the lever. When I try it, nothing happens. I can move it up or down but doesn't stay stuck or anything and activates nothing.
Do I have to do anything in the Level Editor? It's on the same settings as in Pandemoneus' map
RE: Problem when loading map - Pandemoneus - 03-04-2011
If you use that book lever, let me take a look at the offcial maps, I will edit this post soon.
[edit]
The developers made it a bit different for that.
They created a script area in front of the book (in the direction you pull it) and made a normal EntityCollideCallback with the book.