Frictional Games Forum (read-only)
Knockout But Dies? - 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: Knockout But Dies? (/thread-17578.html)



Knockout But Dies? - Brothersvv09 - 08-07-2012

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)


RE: Knockout But Dies? - Adny - 08-07-2012

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


RE: Knockout But Dies? - Brothersvv09 - 08-07-2012

(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