Frictional Games Forum (read-only)

Full Version: When player enters script area then load next level?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Does anyone know what the script is so that if the player enters a specific area then it loads next level / room? And that it should work just as a door (that loads the other level / room)

Please reply ASAP.
TeleportPlayer(string& asStartPosName);


can be used to teleport the player to another area of the same level they're in.

ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound);


can be used to start a new level.
You can't honestly go telling people to reply ASAP to your questions when you're not even posting them in the right section of the forum.

Moved.
(06-20-2012, 07:21 PM)Traggey Wrote: [ -> ]You can't honestly go telling people to reply ASAP to your questions when you're not even posting them in the right section of the forum.

Moved.

You can't blame a newbie ^^
What should i do after with:


-void ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound);
-{
-
-}

??

Any help?
no, just fill the spaces.
Changemap("yourmapname.map", "Yourstartpos", "", "");
use a collide callback for the area and yourself, and add a custom function, where the changemap function is inside.
(06-20-2012, 07:16 PM)Cetex1337 Wrote: [ -> ]Does anyone know what the script is so that if the player enters a specific area then it loads next level / room? And that it should work just as a door (that loads the other level / room)

Please reply ASAP.
AddEntityCollideCallback("Player", "SCRIPTAREA", "FUNCTION", true, 1);





void FUNCTION(string &in asParent, string &in asChild, int alState)
{
ChangeMap("YOURMAP.map", "PlayerStartArea_1", "", "");
}
(06-20-2012, 07:55 PM)Chronogyros Wrote: [ -> ]
(06-20-2012, 07:16 PM)Cetex1337 Wrote: [ -> ]Does anyone know what the script is so that if the player enters a specific area then it loads next level / room? And that it should work just as a door (that loads the other level / room)

Please reply ASAP.
AddEntityCollideCallback("Player", "SCRIPTAREA", "FUNCTION", true, 1);





void FUNCTION(string &in asParent, string &in asChild, int alState)
{
ChangeMap("YOURMAP.map", "PlayerStartArea_1", "", "");
}
Thank you so much, now i understand Smile