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 Quick Lever Problem
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#4
RE: Quick Lever Problem

Spoiler below!

PHP Code: (Select All)
void OnStart()
{
for(
int x 0== 4x++) SetEntityConnectionStateChangeCallback("Lever*"+i"func*"+i);
}

void func(string &in asEntityint alState)
{
if (
alState == 1)
{
SetLocalVarInt("Var1"+asName1);
IsItDone();
AddDebugMessage("First test succeed!"false);
}
}

void IsItDone()
{
if(
GetLocalVarInt("Var1Lever1_1") == && GetLocalVarInt("Var1Lever2_2") == && GetLocalVarInt("Var1Lever3_3") == && GetLocalVarInt("Var1Lever4_4") == 1)
{
SetLevelDoorLocked("level_cistern_1"false);
AddDebugMessage("Door is now unlocked! Also, testing 2 is done."false);
}



Whipped this out. Dunno if it's right. Not tested yet.

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 11-03-2013, 10:45 AM by PutraenusAlivius.)
11-03-2013, 10:41 AM
Find


Messages In This Thread
Quick Lever Problem - by 3gamers - 11-03-2013, 05:44 AM
RE: Quick Lever Problem - by Rapture - 11-03-2013, 07:23 AM
RE: Quick Lever Problem - by Daemian - 11-03-2013, 10:15 AM
RE: Quick Lever Problem - by PutraenusAlivius - 11-03-2013, 10:41 AM



Users browsing this thread: 1 Guest(s)