2

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.

7
  • 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
    Commented Sep 23, 2015 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
    Commented Sep 23, 2015 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
    Commented Sep 23, 2015 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
    Commented Sep 23, 2015 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
    Commented Sep 25, 2015 at 2:23

1 Answer 1

1

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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .