#How to detect if a citizens2 npc is alive (Citizens 2 + Sentinel)

1 messages · Page 1 of 1 (latest)

safe nest
#

Title. I have a "priest" npc that increases your natural regeneration, but I need a method to check the priest's health, because I don't want the priest to buff you if it's dead.

    if player("%{_priestUUID}%") is not dead:
        send "test" to event-entity
        if {_p} is event-entity:
            increase the heal amount by 3
            send "&aYour natural regeneration was buffed by &ePriest&a!" to event-entity
            show 1 heart at event-entity
            show 1 heart at {_priestUUID}```
safe nest
#

mannn

dense saddle
#

Might need to use reflect, idk. Also, I don't see {_priestUUID} being set there, so if that code works, maybe set the variable.

safe nest
#

I actually made it work lol