Lever's Support - 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: Lever's Support (/thread-6393.html) |
Lever's Support - christoff - 01-27-2011 Ok im new to HPL2 as a games engine and im finding it confusing to add a lever into the game and to get the scripts to work. I have a lever on the map named "lever00" and the locked door is "celldoor02" the current script i have is void StateChangeLever(string &in asEntity, int alState) { if(alState == 1){ SetLeverStuckState("lever00", 1, true); SetSwingDoorLocked("celldoor02", false, true); PlaySoundAtEntity("", "Unlock_Door", "celldoor02", 1, false); } But when i play the map when i move the lever down the locked door wont open. Thanks, also anyone got a tutorial on how to make interactions between other items such as wheels and pulley systems? these would be helpful and much appreciated thanks. RE: Lever's Support - Frontcannon - 01-27-2011 AFAIK 1 is up, 0 neutral and -1 down RE: Lever's Support - Pandemoneus - 01-27-2011 And you are missing a closing }. [edit] Check the second link in my sig, it contains a working lever. I've never done a pulley though, you might want to copy that from the original map (refinery). |