The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
i3670 Offline
Posting Freak

Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation: 36
#1
Multiple Levers

Hi!

I have these levers that need to be pulled in a certain order for a door to open. The problem is of course that it isn't working.

void OnStart()
{
SetLocalVarInt("Var1", 0);
SetEntityPlayerInteractCallback("button_1", "func1", true);
SetEntityPlayerInteractCallback("button_2", "func2", true);
SetEntityPlayerInteractCallback("button_3", "func3", true);
SetEntityPlayerInteractCallback("button_4", "func4", true);
}

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);
}
}


01-22-2012, 12:08 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)