Hello
I am trying to use a door to load next map but I don't know a playercallback (or something
) I want the player to click on door and load next map
plz could u help thx
Code:
void OnStart()
{
SetEntityPlayerInteractCallback("DoorName", "TeleportFunction", true);
}
void TeleportFunction(string &in asEntity)
{
ChangeMap("MapName", "PlayerStartArea_1", "", "");
}
That should work, ask me any questions if you need help.
(05-02-2011, 11:48 AM)X4anco Wrote: [ -> ]I cant pm you
Then just ask it on this thread... -_-
Even easier:
1. Select the level door in the level editor.
2. Click the entity tab.
3. Scroll down to MapFile and click the "..." button.
4. Locate the map you want to load and hit load file.
5. It might not be necessary as the game will probably load the first one anyhow, but type the playerstart area name of the next map in the "StartPos" field.
6. Click it in-game and it should work just fine without any scripting