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......
(04-30-2012, 01:22 AM)Rapture Wrote: [ -> ]Here ya go...
Code:
SetEntityInteractionDisabled(string& asName, bool abDisabled);
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?????
...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);