Frictional Games Forum (read-only)

Full Version: Kill Player
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I wanna make an intro where the player walks through a hallway to a door, then the screen fades out, there's a door breaking sound followed by a grunt sound, then the player dies with the phrase "Welcome to The Beginning".
I already got the player walking part, and sort of the death phrase, but is there a script to kill the player, or do I actually need to spawn a grunt?
GivePlayerDamage(100, "slash", true, true);

Hopefully that'll do it.
Ahh thanks a bunch. I forgot about that script, it's been a while since i've used it. Big Grin
Also make sure to use a Check point right away so that you can display the proper death message.

void CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);

Sets a checkpoint at which the player will respawn in case he dies.
Callback syntax: void MyFunc(string &in asName, int alCount)
Count is 0 on the first checkpoint load!

asName - the internal name
asStartPos - the name of the StartPos in the editor
asCallback - the function to call when the player dies/respawns
asDeathHintCat - the category of the death hint message to be used in the .lang file
asDeathHintEntry - the entry in the .lang file
Ahh yes I remember death checkpoints. Anyways, thanks for the help. Big Grin