![]() |
Another question that's probably syntax related >_< - 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 (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: Another question that's probably syntax related >_< (/thread-7146.html) |
Another question that's probably syntax related >_< - Austums - 04-01-2011 Okay, so the only thing I'm not so certain on is the SetLevelDoorLockedSound This is my very first script made from scratch, so I apologize for the somewhat noobish post xP Code: void OnStart() And I just got a really long error stating that it expected something at (1,2) I believe RE: Another question that's probably syntax related >_< - Pandemoneus - 04-01-2011 Delete that and choose the level door in the editor, go to the entity tab and select the sound there. ![]() RE: Another question that's probably syntax related >_< - MrBigzy - 04-01-2011 You need the onenter and onleave functions there too. You can use either the editor or your script to put the sound. It's a matter of personal choice though; I prefer script even though it's not as simple, just because I find it so easy to overlook things I put in the level editor. Here's an example of my script I use for a locked door. Code: void LockedDoor2(string &in asEntity) I had SetGlobalVarInt("Lock", 1); in my OnStart for the variable, as well as SetEntityPlayerInteractCallback("prison_section_1", "LockedDoor", false); for the function. So yea, like the Panda Man said (I totally just made that up, sorry ![]() |