1

/testfor help 5

TSchweibz 3/21/15 9:26 pm
386
3/22/2015 11:18 am
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?
Posted by
TSchweibz
Level 2 : Apprentice Miner
0

  Have something to say?

JoinSign in

9

TheArchitect_95
03/22/2015 11:18 am
Level 32 : Artisan Architect
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.
testfor @e[r=200,score_health_min=1,score_health=10]
where health is the objective name.
1
TextualJavakid
03/22/2015 12:27 am
Level 43 : Master Architect
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
Server_Help32
03/21/2015 10:43 pm
Level 7 : Apprentice Crafter
ya that would probrobally work
1
TSchweibz
03/21/2015 10:31 pm
Level 2 : Apprentice Miner
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
Server_Help32
03/21/2015 10:23 pm
Level 7 : Apprentice Crafter
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
TSchweibz
03/21/2015 10:08 pm
Level 2 : Apprentice Miner
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?
1
TSchweibz
03/21/2015 9:59 pm
Level 2 : Apprentice Miner
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?
1
TSchweibz
03/21/2015 9:51 pm
Level 2 : Apprentice Miner
No sorry the video must be not updated because the command he uses doesn't work, any ideas?
1
TextualJavakid
03/21/2015 9:34 pm
Level 43 : Master Architect
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)
1

Welcome