Jump to content

[Solved] Question about checking if player is dead


Recommended Posts

If I want to prevent some code from happening if a character's dead or check if a character's dead would it be best to use both

if inst.components.health:IsDead() or inst:HasTag("playerghost") then

or just one of any of them is enough or is best to have them both? Because I seen mods who sometimes use both, & I'm wondering if it's important to check for both of them :), thanks :D!

Edited by SuperDavid
Link to comment
Share on other sites

Use both, certain actions require the isdead code to disable things that shouldn't happen(regeneration is one of them). Other than that it is possible that some mods trick the game into thinking a character is dead but isn't(so got to check or get a crash later down the road).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...