1
Giving score to entities in certain radius of players
So my idea was when you are wearing a chestplate flame particles spawn around them
/execute @a[score_ARMOR_min=1] ~ ~ ~ /particle flame ~ ~-1 ~ .01 5 5 5 50
then if the score of "ARMOR" is 1 it detects all entities in a radius of 5 from the player /execute @a[score_ARMOR_min=1] ~ ~ ~ /testfor @e[type=!Player,r=5]
it doesn't update though even though I'm standing right next to a cow it won't give me an output and the fill clock is on. What I wanted to know can I give a score to those entities, so I can /execute @e[score_BurnMobs_min=1] ~ ~ ~ /setblock fire ~ ~-1 ~ 0 replace air
Create an account or sign in to comment.
2
1
Well to give someone a score in a certain radius of a player you will do /execute @p ~ ~ ~ scoreboard players set @e[r=INSTERTRADIUSHERE] OBJECTIVE VALUE
1
I created a similar setup to what you have here, but I was only using a /say command instead of the testfor. It seemed to work fine, which leads to me to believe it's just an issue with using the comparator, and giving the mobs a scoreboard value when they get close to you should work. You'd also be able to nest another execute command directly after the first one, which would eliminate the need for the scoreboard. I'm thinking something like this:
Only thing to keep in mind is that setblock's replace doesn't work the same as fill's replace, and if you only want to replace air then you'll have to use fill instead.
execute @a[score_ARMOR_min=1] ~ ~ ~ execute @e[type=!Player,r=5] ~ ~ ~ setblock ~ ~-1 ~ fire
Only thing to keep in mind is that setblock's replace doesn't work the same as fill's replace, and if you only want to replace air then you'll have to use fill instead.