1

I'm trying to summon a wither skeleton on top of an arrow by the time it lands in the ground. It can be summoned in-flight or upon arrival, I don't really care. Every method I've tried so far involves assigning the arrow an objective, but it has not taken any of the objectives, so the skeleton cannot be summoned.


Shadow_Mage is the team of the player shooting the arrow
Sarrow is the objective I'm trying to assign; it's type dummy

Running in an always-active unconditional repeating block:
execute @a[team=Shadow_mage] ~ ~ ~ scoreboard players set @e[type=Arrow,r=3] Sarrow 1 {inGround:1b}

Running in an another always-active unconditional repeating block:
execute @e[type=Arrow,score_Sarrow_min=1,score_Sarrow=1] ~ ~ ~ (valid summon command here)

After that I'm going to execute @ the skeleton to kill the nearest arrow.

When I run testfor @e[r=5,type=Arrow,score_Sarrow_min=1] I get no responses - even though I am of the team Shadow_mage and the arrow is within 5 meters.


Is my command setup wrong, so the arrow isn't being assigned the objective?
Is the objective being set, but I'm interacting with it wrong?
Is there a better way to reach the right end result?

  • Your commands are correct syntax-wise. Your score assigning command will only target arrows in the ground within 3 blocks of a Shadow Mage, but your testfor is looking within 5. Try moving closer and testing again. I would suggest also switching to a scoreboard tag. They are great for one-state marking and don't require a dummy objective. Finally, I would suggest using a command chain, instead of two separate repeating commands. It would ensure that the commands execute in the correct order, although this is not necessary. (I wrote this in a comment because it's not an actual solution) – SB32 Jan 8 '17 at 23:49
  • @SB32 Thanks. The testfor still has / had no output at any distance. I'm willing to try scoreboard tags but I'm unfamiliar; maybe that part could become the answer. – Zxyrra Jan 8 '17 at 23:55
  • my guess would be that Shadow_Mage is not capitalised correctly in your execute command. also, this will summon a skeleton at every arrow that is in a 3 block range of the mage in the ground, is that what you wanted it to do? – Plagiatus Jan 10 '17 at 0:04
0

What you need to do is have an extra scoreboard command (Warrow) and then go from there.

Put the command execute @a[team=Shadow_mage] ~ ~ ~ scoreboard players set @e[type=Arrow,r=2] Sarrow 1 into a repeating command block with the following commands in order into 3 chain command blocks after it:

/scoreboard players set @e[type=Arrow,score_Sarrow_min=1,score_Sarrow=1] Warrow 1 {inGround:1b}

execute @e[type=Arrow,score_Warrow_min=1,score_Warrow=1] ~ ~ ~ summon Wither ~ ~ ~

kill @e[type=Arrow,score_Warrow_min=1,score_Warrow=1]

The first command finds out which arrows are shot by team Shadow_mage (or near them, unfortunately), and sets their score of Sarrow to 1, then the second command gives those arrows a score of 1 in Warrow when they hit the ground, the third command summons the Wither, and the last command kills the arrow to stop it from constantly summoning Withers

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.