Frictional Games Forum (read-only)
Custom story crashes at this map: 03_hall.map - Printable Version

+- 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 - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Custom story crashes at this map: 03_hall.map (/thread-25707.html)



Custom story crashes at this map: 03_hall.map - goalreadymc - 07-18-2014

im testing my custom story and when i get to the map its crashes. i think ive done my scripting wrong. can anyone examine it?

Code:
void OnStart()
{

PlayMusic("09_amb_safe.ogg", true, 3, 3, 1, true);

}

{

AddUseItemCallback("", "cellar_key", "cellar_door", "UsedKeyOnDoor", true);

}


void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("cellar_door", false, true);
    PlaySoundAtEntity("", "unlock_door", "cellar_door, 0, false);
    RemoveItem("cellar_key");
}
[/align]


RE: Custom story crashes at this map: 03_hall.map - Romulator - 07-18-2014

PHP Code:
void OnStart()
{
PlayMusic("09_amb_safe.ogg"true331true);
AddUseItemCallback("""cellar_key""cellar_door""UsedKeyOnDoor"true);
}

void UsedKeyOnDoor(string &in asItemstring &in asEntity)
{
    
SetSwingDoorLocked("cellar_door"falsetrue);
    
PlaySoundAtEntity("""unlock_door""cellar_door"0false); //Mudbill told me to fix this :D
    
RemoveItem("cellar_key");


That should fix it...

EDIT: Thanks Mudbill, fixed that :3


RE: Custom story crashes at this map: 03_hall.map - Mudbill - 07-18-2014

^Missing closing quote on cellar_door down there. Just add it before the comma.


RE: Custom story crashes at this map: 03_hall.map - goalreadymc - 07-18-2014

K, it works now. thx!