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?
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: Change lever function?

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");
}
}

"Veni, vidi, vici."
"I came, I saw, I conquered."
05-23-2013, 04:14 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)