Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Multiple Levers
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#10
RE: Multiple Levers

Also In this following post, you want the levers to stay stuck afterward, use this addition
______________________________________________________________________________


void OnStart()
{
SetLocalVarInt("Var1", 0);
SetEntityConnectionStateChangeCallback("Lever1", "func1");
SetEntityConnectionStateChangeCallback("Lever2", "func2");
SetEntityConnectionStateChangeCallback("Lever3", "func3");
SetEntityConnectionStateChangeCallback("Lever4", "func4");
}

void func1(string &in asEntity, int alState)
{
if (alState == 1)
{
AddLocalVarInt("Var1", 1);
SetLeverStuckState(Lever1, 1, true);
func5();
}
}

void func2(string &in asEntity, int alState)
{
if (alState == 1)
{
AddLocalVarInt("Var1", 1);
SetLeverStuckState(Lever2, 1, true);
func5();
}
}

void func3(string &in asEntity, int alState)
{
if (alState == 1)
{
AddLocalVarInt("Var1", 1);
SetLeverStuckState(Lever3, 1, true);
func5();
}
}

void func4(string &in asEntity, int alState)
{
if (alState == 1)
{
AddLocalVarInt("Var1", 1);
SetLeverStuckState(Lever4, 1, true);
func5();
}
}

void func5()
{
if(GetLocalVarInt("Var1") == 4)
{
SetEntityActive("castle_gate_arched01_1", false);
SetEntityActive("castle_gate_arched01_2", true);
}
}


Just add the stuck states
Oh you wanted certain order...well theres the Staying in on position, i'll see if i can set something up for the specific order, but i've never done it before...What was the order you wanted?

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
(This post was last modified: 01-22-2012, 12:55 PM by Tripication.)
01-22-2012, 12:53 PM
Find


Messages In This Thread
Multiple Levers - by i3670 - 01-22-2012, 12:08 PM
RE: Multiple Levers - by Tripication - 01-22-2012, 12:09 PM
RE: Multiple Levers - by i3670 - 01-22-2012, 12:20 PM
RE: Multiple Levers - by Tripication - 01-22-2012, 12:21 PM
RE: Multiple Levers - by i3670 - 01-22-2012, 12:37 PM
RE: Multiple Levers - by Tripication - 01-22-2012, 12:40 PM
RE: Multiple Levers - by i3670 - 01-22-2012, 12:41 PM
RE: Multiple Levers - by Tripication - 01-22-2012, 12:44 PM
RE: Multiple Levers - by i3670 - 01-22-2012, 12:52 PM
RE: Multiple Levers - by Tripication - 01-22-2012, 12:53 PM
RE: Multiple Levers - by i3670 - 01-22-2012, 01:04 PM
RE: Multiple Levers - by Tripication - 01-22-2012, 01:05 PM
RE: Multiple Levers - by i3670 - 01-22-2012, 01:12 PM
RE: Multiple Levers - by Tripication - 01-22-2012, 01:42 PM



Users browsing this thread: 9 Guest(s)