Frictional Games Forum (read-only)

Full Version: Leveldoor N00B
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello

I am trying to use a door to load next map but I don't know a playercallback (or something Tongue ) 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.
I cant pm you
(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 Smile
Big Grin Big Grin Big Grin Big Grin
How would I get some txt to appear when a player looks at somthing?