Mob Health Check [duplicate]

Mob Health Check [duplicate] - Serious laboratory technician dressed in uniform and safety glasses carrying out titration during work in laboratory inserting pipette into flask with reagent

My question is as simple as it sounds; is there a way to check if a mob (and perhaps of a custom named mob) has x amount of health left. Example: Im making a skeleton boss, and when he hits half health, I want him to summon some "skeleton warriors" to assist him in battle. Any ideas?



Best Answer

Yes you can test for a mob with a specific amount of health and a custom name.


For example:

/testfor @e[x,y,z,r,type=Creeper,name=George] {Health:10s}

would test for a creeper within a radius of the target coordinates named George with 10 health. This should be placed on a loop to continually test the parameters.

Also, note that the {Health:10s} tag is separate from the entity tags. That is because health can only be stored in an NBT tag for mobs. As an added note, health can only be tested for exact values, not ranges.

(Source)




Pictures about "Mob Health Check [duplicate]"

Mob Health Check [duplicate] - Body part of unrecognizable scientist in white uniform writing down formula after providing chemical research with fluid in flask during science lesson in university
Mob Health Check [duplicate] - Unrecognizable female wearing white shirt while standing on white background with diaphragm of stethoscope on red handmade heart in room
Mob Health Check [duplicate] - Unrecognizable female in pink sweater with stethoscope on neck standing on white background with red heart in hand in daylight



How do you know how much health a mob has?

Yes you can test for a mob with a specific amount of health and a custom name. would test for a creeper within a radius of the target coordinates named George with 10 health. This should be placed on a loop to continually test the parameters. Also, note that the {Health:10s} tag is separate from the entity tags.



Find Duplicate Entries in Excel




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: RF._.studio, RF._.studio, Puwadon Sang-ngern, Puwadon Sang-ngern