1
/testfor help 5
Can you testfor if a mob is close to a player?
Also Can you test for when a mob is at a Certain health or Low health?
Any Ideas?
Also Can you test for when a mob is at a Certain health or Low health?
Any Ideas?
Create an account or sign in to comment.
9
1
Now you can use statistics in scoreboards, you can actually query an entity's health as an objective criterion, health is read only and cannot be modified this way but changes when the entity is damaged or healed. There is more about this on the Minecraft Wiki Scoreboard page.
eg.
where health is the objective name.
eg.
testfor @e[r=200,score_health_min=1,score_health=10]
where health is the objective name.
1
I am using testfor commands for a map i'm currently making, but nothing this complicated. search around YouTube for more videos if you haven't already. Your other best bet is to check out the minecraft wiki, helped me out with a win detection system, maybe it might help you?
1
ya that would probrobally work
1
No it's for a map I'm making but I guess I could just use a strip of command blocks which each testing for a health from 1-10
1
Are you doing this for a server or what ? If it is for a server we could help out alot as we have a strong background in command blocks
1
got a command that works for the radius I had just messed up on the one in the video
/execute @e[type=Blaze,name=DLS_Android] ~ ~ ~ /execute @p[r=6] ~ ~ ~ /setblock ...
but can i compact the health testor for like a min/max health?
/execute @e[type=Blaze,name=DLS_Android] ~ ~ ~ /execute @p[r=6] ~ ~ ~ /setblock ...
but can i compact the health testor for like a min/max health?
1
I found this command for testing for low health: /testfor @e[type=Blaze] {CustomName:"DLS_Android",Health:100s}
but is there anyway to make a health range?
but is there anyway to make a health range?
1
No sorry the video must be not updated because the command he uses doesn't work, any ideas?
1
This video could answer everything: https://www.youtube.com/watch?v=UnoLSSUAUMM (Might not work because some people in the comments are saying they have trouble with it)