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
#2
RE: Multiple Levers

Is there an error report, or will it just not work?
and are you sure you dont want
castle_gate_arched01_open?
oh, you used the wrong callback(if your using levers)

you should have

void OnStart()
{
SetLocalVarInt("Var1", 0);
SetEntityConnectionStateChangeCallback("lever", "func1");
SetEntityConnectionStateChangeCallback("lever", "func2");
SetEntityConnectionStateChangeCallback("lever", "func3");
SetEntityConnectionStateChangeCallback("lever", "func4");
}

void func1(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
func5();
}

void func2(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
func5();
}

void func3(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
func5();
}

void func4(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
func5();
}

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

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
(This post was last modified: 01-22-2012, 12:20 PM by Tripication.)
01-22-2012, 12:09 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: 1 Guest(s)