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
Levers in different levels
LankySpankey103 Offline
Junior Member

Posts: 10
Threads: 3
Joined: Feb 2013
Reputation: 0
#4
RE: Levers in different levels

Okay so i tried your method but no luck. Would you care to take a look at my coding?

So I have in my first room where the locked door is, which the 2 levers are supposed unlock.
Quote:void OnStart()
{
//Variables
SetGlobalVarInt("door_exit", 0);
}

void OnEnter()
{
if(GetGlobalVarInt("door_exit") == 2)
{
SetLevelDoorLocked("level_wood_double_1", false);
}
}

Then in the second room with the first lever i have this:
Quote:void OnStart()
{
SetEntityConnectionStateChangeCallback("lever_grave", "lever_exit_1");
}

void lever_exit_1(string &in asEntity, int alState)
{
if (alState == 1)
{
AddGlobalVarInt("door_exit", 1);
SetLeverStuckState("lever_grave", 1, true);
}
}

And the third room:
Quote:void OnStart()
{
SetEntityConnectionStateChangeCallback("lever_torture", "lever_exit_2");

}

void lever_exit_2(string &in asEntity, int alState)
{
if (alState == 1)
{
AddGlobalVarInt("door_exit", 1);
SetLeverStuckState("lever_torture", 1, true);
}
}

Thanks in advance.
09-18-2013, 08:07 PM
Website Find


Messages In This Thread
Levers in different levels - by LankySpankey103 - 09-17-2013, 10:43 PM
RE: Levers in different levels - by Apjjm - 09-17-2013, 11:39 PM
RE: Levers in different levels - by Apjjm - 09-18-2013, 11:02 PM
RE: Levers in different levels - by LankySpankey103 - 09-18-2013, 08:07 PM



Users browsing this thread: 1 Guest(s)