Frictional Games Forum (read-only)

Full Version: Teleport the player when he collides an area
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there, my problem is that my player has to sleep to go to the other levels, so i put a script area on the bed so when the player gets on it, it gets teleported to another map. But i can't think the script. How should it be? Is it possible to do it?

Thanks in advance
http://wiki.frictionalgames.com/hpl2/amn..._functions
everything is in the forum!
ChangeMap(string& asMapName, string& asStartPos, string& asStartSound, string& asEndSound);
=the script
Thanks, it was very useful
(08-05-2012, 01:05 AM)ExenderVes Wrote: [ -> ]Thanks, it was very useful
Can you tell me how you did it? I can't seem to figure out were to put


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


My next problem is: how does the script know what areas I want to use??
(the callback code perhaps?)


-SmokeMelvin
There are lots of ways to incorporate ChangeMap.

Code:
AddTimer(string& asName, float afTime, string& asFunction);

Code:
SetEntityPlayerInteractCallback(string& asName, string& asCallback, bool abRemoveOnInteraction);

Code:
AddEntityCollideCallback(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide, int alStates);