I've been doing a special bow... That, for the technical side, summons an armor stand when the arrow hits the ground. The armor stand is important for several reasons, but I only want one of it when the arrow lands. The thing is... the arrow lands, and most of the time it spawns at least two armor stands - Generally half a block to 2 blocks apart.
What I want to know, in short, is how, executing at a particular entity (let's just call it IceBlock, as I have) can I have it kill another entity called IceBlock if it is nearby?
I tried killing any entities called IceBlock at least 0.1 blocks away and not more than 2 blocks away, but the thing is... it executes the command at BOTH armor stands, meaning that if there is another IceBlock in that radius, BOTH of the armor stands get killed, where I only want one...
Can anyone help me?
Thanks in advance...
(Sorry if I ramble on about nothing without getting to the point a lot)...
Rollback Post to RevisionRollBack
Please, everyone, if your post is solved, edit the name and mark it [SOLVED]. Period.
You would have to tag one of the armor stands and then execute from it, the way you could do that is something like this:
execute as @e[type=arrow] at @s unless entity @e[type=armor_stand,tag=tagged,distance=..2] run tag @e[type=armor_stand,distance=..1,limit=1,sort=nearest] add tagged
and then
/execute as @e[tag=tagged] at @s run kill @e[type=armor_stand,tag=!tagged,distance=..1]
/execute as @e[tag=tagged] at @s run kill @e[type=arrow,distnace=..1]
I haven't tested this yet but theoretically, it should work.
I've been doing a special bow... That, for the technical side, summons an armor stand when the arrow hits the ground. The armor stand is important for several reasons, but I only want one of it when the arrow lands. The thing is... the arrow lands, and most of the time it spawns at least two armor stands - Generally half a block to 2 blocks apart.
What I want to know, in short, is how, executing at a particular entity (let's just call it IceBlock, as I have) can I have it kill another entity called IceBlock if it is nearby?
I tried killing any entities called IceBlock at least 0.1 blocks away and not more than 2 blocks away, but the thing is... it executes the command at BOTH armor stands, meaning that if there is another IceBlock in that radius, BOTH of the armor stands get killed, where I only want one...
Can anyone help me?
Thanks in advance...
(Sorry if I ramble on about nothing without getting to the point a lot)...
Please, everyone, if your post is solved, edit the name and mark it [SOLVED]. Period.
You would have to tag one of the armor stands and then execute from it, the way you could do that is something like this:
and then
I haven't tested this yet but theoretically, it should work.
Command block engineer // Developer // #TeamTrees
Thankyou very much! Haven't tested it yet, but it looks like it should, by my logic.
Please, everyone, if your post is solved, edit the name and mark it [SOLVED]. Period.