Frictional Games Forum (read-only)
How to teleport? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Technical Support (https://www.frictionalgames.com/forum/forum-57.html)
+--- Forum: Technical Support - Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-31.html)
+--- Thread: How to teleport? (/thread-7943.html)



How to teleport? - Jumpman - 05-11-2011

I was wondering something...

I want to make the player teleport, but how do I script that?

I just want the player to go on a trigger and teleport him to another room.

I cant find the anser anywere..


RE: How to teleport? - Ocean112 - 05-11-2011

rofl let me get this straight...you want to make your player teleport around the map like some mod or something??


RE: How to teleport? - Roenlond - 05-11-2011

void OnStart()
{
AddEntityCollideCallback("Player", "Teleport_Area", "Teleport", true, 1);
}

void Teleport(string &in asParent, string &in asChild, int alState)
{
TeleportPlayer("Teleport_To_Area");
}

That should do it. When the player enters the "Teleport_Area", it will call the function Teleport and teleport the player to "Teleport_To_Area".


RE: How to teleport? - Jumpman - 05-19-2011

Thx Smile it worked fine Smile I was a litte lost when I also put the "Player" with my player name.. but it worked fine when I looked closer at your reply Smile