Another script with 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: Another script with levers (/thread-15178.html) |
Another script with levers - WLN73 - 04-30-2012 Hi again .... i hope someone can give me an hand....... I need a script to enable / disable a series of levers with a main lever ( if the MAIN lever is off the other don't work, if the lever is on .... i can use the other levers ) Thanks...... RE: Another script with levers - Rapture - 04-30-2012 Here ya go... Code: SetEntityInteractionDisabled(string& asName, bool abDisabled); RE: Another script with levers - WLN73 - 04-30-2012 (04-30-2012, 01:22 AM)Rapture Wrote: Here ya go...Thank you ... I tried but they work even if I don't use the first lever Or i wronged something....what i have to write at "bool abDisabled" ???? I maked this: void OnEnter() { SetEntityPlayerInteractCallback("switch4", "func1", true); SetEntityPlayerInteractCallback("switch1", "func2", true); } void func1(string &in EntityName, int alState) { if( alState == -1) SetEntityInteractionDisabled("switch1", true); if( alState == 1) SetEntityInteractionDisabled("switch1", false); } void func2(string &in EntityName, int alState) { if( alState == -1) SetLampLit("lampada1", false, true); if( alState == 1) SetLampLit("lampada1", true, true); } What i wrong????? RE: Another script with levers - WLN73 - 04-30-2012 ...ew....i resolved half problem...im put the "Callback" and the "SetEntityInteractionDisabled" ON START void .... and now working..............BUT......and i say....but...... I have to set the lever to OFF in the game ....ew.... Instead I want is already OFF automatically when the level start ... ... Edit...... I've resolved the other half problem Putted this in the START: SetLeverStuckState("switch1", -1, true); |