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
Change lever function?
Bridge Offline
Posting Freak

Posts: 1,971
Threads: 25
Joined: May 2012
Reputation: 128
#3
RE: Change lever function?

(05-23-2013, 04:14 PM)JustAnotherPlayer Wrote: You can use local var int's.
void OnStart()
{
SetEntityConnectionStateChangeCallback("LeverName", "ElevatorUse");
SetLocalVarInt("Dream", 1);
}

void ElevatorUse(string &in asEntity, int alState)
{
if(GetLocalVarInt("Dream") == 1) //Dream occur!
{
ChangeMap("MapName", "PlayerStartAreaInTheMap", "SoundPlayedWhenTheChangeOccurs", "SoundPlayedWhenNewMapIsLoaded");
}

else //Dream over. I'm gonna wait for Tomato Cat to fix this.
{
ChangeMap("MapName", "PlayerStartAreaInTheMap", "SoundPlayedWhenTheChangeOccurs", "SoundPlayedWhenNewMapIsLoaded");
}
}

In case you didn't know, int is short for integer. They are not normally (or ever, I'd say) referred to as "ints".
05-23-2013, 08:34 PM
Find


Messages In This Thread
Change lever function? - by Storfigge - 05-23-2013, 03:51 PM
RE: Change lever function? - by PutraenusAlivius - 05-23-2013, 04:14 PM
RE: Change lever function? - by Bridge - 05-23-2013, 08:34 PM
RE: Change lever function? - by Tomato Cat - 05-23-2013, 10:10 PM



Users browsing this thread: 1 Guest(s)