Page 1 of 1
Find out if player is dead?
Posted: Sat Jun 03, 2017 10:40 am
by 321freddy
How can I find out if a player is dead? I tried player.character == nil but this fails when the player is not connected or in god controller mode.
Re: Find out if player is dead?
Posted: Sat Jun 03, 2017 10:45 am
by daniel34
I have not tested this but looking at the API you should be able to check player.controller_type and if it's defines.controllers.ghost then the player is dead ("Can't interact with the world, can only observe. Used in the multiplayer waiting-to-respawn screen").
Re: Find out if player is dead?
Posted: Sat Jun 03, 2017 12:49 pm
by 321freddy
It worked! Thanks for the quick reply!
