Find out if player is dead?
Find out if player is dead?
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.
My mods:
Re: Find out if player is dead?
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").