Frictional Games Forum (read-only)

Full Version: Possible to Teleport Player?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was wondering, is it possible to teleport the player for like an intro without using another map?
TeleportPlayer(" [PlayerStartArea_ name here] ");
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 { }?


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 =)

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
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");
}