Page 1 of 1

Scripting - check if the player is dead or not

Posted: January 25th, 2010, 6:16 pm
by Rezil
Just as the title says, how do I check whether the player has died or not? The spawn has a trigger so all the players are tracked via array but i don't know the exact command for when the user dies.

Re: Scripting - check if the player is dead or not

Posted: January 25th, 2010, 6:47 pm
by waywaaaard
it's simple:

Code: Select all

 isAlive(player) 
or do you want to have a callback if he dies? For that have a look in the gametype scripts in the iwds dm or tdm

Re: Scripting - check if the player is dead or not

Posted: January 25th, 2010, 6:54 pm
by waywaaaard
Lev!athan wrote:it's simple:

Code: Select all

 isAlive(player) 
or do you want to have a callback if he dies? For that have a look in the gametype scripts in the iwds dm or tdm

ah here:

Code: Select all

self notify("killed_player");
in the tdm script line: 383 Callback_PlayerKilled

Re: Scripting - check if the player is dead or not

Posted: January 25th, 2010, 7:06 pm
by Rezil
Aah thanks, isAlive is what I was looking for. :)