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 Not sure what to title this actually!
MsHannerBananer Offline
Member

Posts: 218
Threads: 34
Joined: Sep 2013
Reputation: 10
#3
RE: Not sure what to title this actually!

(03-06-2014, 02:06 AM)Mudbill Wrote: Use global variables. It's quite easy actually.

When you have successfully accomplished the drainage in the other level, use SetGlobalVarInt("Drain", 1); in your script.

When you enter the hub again, within OnEnter() do something like this:

if(GetGlobalVarInt("Drain") == 1) {
    DrainWater(); //Basically whatever effect you want to happen to indicate this or just change the water.
    SetGlobalVarInt("Drain", 0); //Just so this event does not happen if you re-enter again.
}

Lifesaver as always, Mudbill. Big Grin

03-06-2014, 04:29 AM
Find


Messages In This Thread
RE: Not sure what to title this actually! - by MsHannerBananer - 03-06-2014, 04:29 AM



Users browsing this thread: 1 Guest(s)