Frictional Games Forum (read-only)

Full Version: Area that kills player?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In one of my maps, I want it so when you hit the ground (which is also going to be an area) it kills you. Because the fall damage enough isn't going to finish you off.
Make an area surrounding the bottom and name it "deathzone" Then add these with your info where necessary:

void OnStart()
{
AddEntityCollideCallback("Player", "deathzone", "killplayer_func", false, 1);
}


void killplayer_func(string &in asParent, string &in asChild, int alState)
{
SetPlayerHealth(0);
}
(01-05-2012, 05:00 AM)Statyk Wrote: [ -> ]Make an area surrounding the bottom and name it "deathzone" Then add these with your info where necessary:

void OnStart()
{
AddEntityCollideCallback("Player", "deathzone", "killplayer_func", false, 1);
}


void killplayer_func(string &in asParent, string &in asChild, int alState)
{
SetPlayerHealth(0);
}
Thanks once again. lol