What I'm trying to do is simply this:

/execute @e[type=Fireball] ~ ~ ~ scoreboard players set @a[score_mage_min=1] Cooldown 15 

And applying it only to players with mage score of 1 in a 2 block radius. So I found out that I had to make something like this:

/execute @e[type=Fireball] ~ ~ ~ scoreboard players set @a[score_mage_min=1,r=2] Cooldown 15 

However it doesn't work, and I cannot realize why.

  • 1
    Try increasing the radius and see what happens. 2 blocks might be to small to catch the mage in a game tick. Generally, it looks like you should look into detecting the use of the Fireball directly, rather than being near it (which will affect enemy mages). – MrLemon Sep 23 '15 at 15:29
  • I fixed it as you suggested just changing the way it worked the cooldown, but I still can't understand why that command above won't work – Lionitow Sep 23 '15 at 19:17
  • Did you need to use the direction for the fireball. /execute @e[type=Fireball] ~ ~ ~ scoreboard players set @a[score_mage_min=1,r=2,direction:[0.0,0.0,0.0]}] Cooldown 15 – IIBrick Sep 23 '15 at 21:08
  • Instead of targeting all players with a mage score of at least 1, why not use @p and target the closest player? – MBraedley Sep 23 '15 at 21:45
  • How do you have the fireball casting implemented? There might be a way to select the desired player that way, since this method will, as @MrLemon pointed out, target enemy mages – Unionhawk Sep 25 '15 at 2:23

You have to do:

/execute @e[type=Fireball] ~ ~ ~ scoreboard players set @a[score_mage_min=1,r=3] Cooldown 15 

So make it in a radius of 3 instead of 2. And if you want to make fireballs do:

/execute @e[type=Snowball] ~ ~ ~ /summon Fireball ~ ~ ~ {direction:[],ExplosionPower:1}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.