Frictional Games Forum (read-only)
[SCRIPT] Possible to Teleport Player? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] Possible to Teleport Player? (/thread-13581.html)



Possible to Teleport Player? - A.I. - 02-25-2012

I was wondering, is it possible to teleport the player for like an intro without using another map?


RE: Possible to Teleport Player? - Unearthlybrutal - 02-25-2012

TeleportPlayer(" [PlayerStartArea_ name here] ");


RE: Possible to Teleport Player? - A.I. - 02-25-2012

Would it be something like AddEntityCollideCallback at the beginning and then in there it would have ("Player", "Teleport" "PlayerCollideArea", true, 1), with void PlayerCollideArea(string &in Parent, string &in Child, int alState) and have the teleportplayer in { }?


RE: Possible to Teleport Player? - Unearthlybrutal - 02-25-2012



void OnStart()
{
AddEntityCollideCallback("Player", "area name here", "Tele", true, 1);
}

void Tele(string &in asParent, string &in asChild, int alState)
{
TeleportPlayer(" [PlayerStartArea_ name here] ");
}

//play around with area names and you should get it working then =)




RE: Possible to Teleport Player? - A.I. - 02-25-2012

Ehh one last thing, how would their be delay I have tried putting it like this:


void Tele(string &in asParent, string &in asChild, int alState)
{
AddTimer("T1", 5.0f, "Timer_1");
TeleportPlayer("CameraPos_2");
}

but never would delay the teleport


RE: Possible to Teleport Player? - Unearthlybrutal - 02-25-2012

void OnStart()
{
AddEntityCollideCallback("Player", "area name here", "Tele", true, 1);
}

void Tele(string &in asParent, string &in asChild, int alState)
{
AddTimer("T1", 5.0f, "Timer_1");
}

void Timer_1(string &in asTimer)
{
TeleportPlayer("CameraPos_2");
}