Frictional Games Forum (read-only)

Full Version: Knockout But Dies?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I recently finished my Teleport script, but.. when i teleport i die? Here is my script! Is there something wrong with it?



void Knockout(string &in asEntity)
{
SetPlayerActive(false);
FadeOut(0.8f);
MovePlayerHeadPos(0.0f, -1.25f, 0.0f, 1.5f, -1.0f);
FadePlayerRollTo(3.0f, 4.5f, 5.0f);
PlaySoundAtEntity("", "player_bodyfall", "Player", 0.0f, true);
AddTimer("Teleport", 2.0f, "Lol");
AddTimer("FadeIn", 2.0f, "Lol");
}

void Lol(string &in asTimer)
{
if(asTimer == "Teleport")
{
FadePlayerRollTo(0, 4.5f, 5.0f);
MovePlayerHeadPos(0, 0, 0, 5, 0);
TeleportPlayer("TeleportHere");
}
if(asTimer == "FadeIn")
{
SetPlayerActive(true);
FadeIn(1.0f);
}
}



When I spawn i keep seeing myself falling. Thanks! (P.S. I die then)
Sounds like the PlayerStartArea you're trying to teleport to isn't placed properly and it's causing the player to fall through the ground, make sure it's at ground level (i.e. if the ground's y height is 4, the area's y height should be 4, etc).
(08-07-2012, 08:40 PM)andyrockin123 Wrote: [ -> ]Sounds like the PlayerStartArea you're trying to teleport to isn't placed properly and it's causing the player to fall through the ground, make sure it's at ground level (i.e. if the ground's y height is 4, the area's y height should be 4, etc).
Thanks