Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Area that kills player?
FreshKorruption Offline
Member

Posts: 94
Threads: 27
Joined: Oct 2011
Reputation: 1
#1
Area that kills player?

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.

Custom Stories

-BrastaSauce

01-05-2012, 04:55 AM
Website Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#2
RE: Area that kills player?

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
Find
FreshKorruption Offline
Member

Posts: 94
Threads: 27
Joined: Oct 2011
Reputation: 1
#3
RE: Area that kills player?

(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

Custom Stories

-BrastaSauce

01-05-2012, 05:11 AM
Website Find




Users browsing this thread: 1 Guest(s)