![]() |
Connecting levers - 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: Connecting levers (/thread-15028.html) |
Connecting levers - Sprytny - 04-23-2012 Hi, I want to make the key appear when i pull all four levers down. There is some code i have already generated: } ConnectEntities("","lever_1","metaldoor_1key", true, 1, "Levers"); } void Levers(string &in asConnectionName, string &in asMainEntity, string &in asConnectEntity, int alState) { SetLeverStuckState(asMainEntity, 1, true); SetEntityActive("metaldoor_1key", true); } I woudl like to extend this to add a few more levers. Any ideas? RE: Connecting levers - LulleBulle - 04-23-2012 http://wiki.frictionalgames.com/hpl2/tutorials/script/buttons_that_open_a_door http://wiki.frictionalgames.com/hpl2/tutorials/script/levers_and_secretshelfs Try one of those. Also please search the wiki before asking questions. RE: Connecting levers - Cranky Old Man - 04-23-2012 The key line that you're looking for, might me this one: if(GetLocalVarInt("VarLever_1") == 1 && GetLocalVarInt("VarLever_2") == 1 && GetLocalVarInt("VarLever_3") == 1 && GetLocalVarInt("VarLever_4") == 1) { // Activate key. } RE: Connecting levers - Sprytny - 04-23-2012 @LulleBulle I will, sorry for that but i coudn't find that. Next time I gonna search better. Thank you both ![]() |