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
Level doors with different shape
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#2
RE: Level doors with different shape

It's actually really easy Smile
void OnStart()
{
SetEntityPlayerInteractCallback("hatch", "ChangeLevel", true); //Adds a callback to call the function ChangeLevel when "hatch" is interacted with. True simply means that the callback is only called once.
}

void ChangeLevel(string &in entity, string &in type)
{
ChangeMap("01.map", "PlayerStartArea_1", "", ""); //Changes to level "01.map" and you will start at "PlayerStartArea_1", of course change that if you wish.
}

//This is a comment explaining what each line does, and is ignored by the engine Smile
05-14-2011, 12:19 PM
Find


Messages In This Thread
Level doors with different shape - by Modular100 - 05-14-2011, 12:06 PM
RE: Level doors with different shape - by Roenlond - 05-14-2011, 12:19 PM



Users browsing this thread: 1 Guest(s)