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
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#2
RE: Levers in different levels

You can store the lever state in a global variable. E.g.
void OnLeave() {
  SetGlobalVarInt("Lever_Map1_state",GetLeverState("MyLever"));
}
You can also set the global variable in the levers state change callback (this way is probably better). Make sure you have the "full game save" property checked for the levers so the state isn't forgotten if you revisit the level.

You can then test the state value (1/-1 depending on "on"/"off") as needed for each lever.
09-17-2013, 11:39 PM
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



Users browsing this thread: 1 Guest(s)