#How to summon arrows that track an entity?

1 messages · Page 1 of 1 (latest)

mortal lantern
#

Hello! I'm making a bow enchantment called Storm, the purpose of this enchantment is that when you hit an entity, additional arrows will spawn from the sky. However, I need help figuring out either how to make the arrows try to track the hit entity or fall randomly around them, as having a set pattern will allow players to easily dodge. Currently, I have around six arrows summoned 10 blocks above the mob and one block behind, but this does not guarantee the mob will be hit. I do want to guarantee at least one or two arrows that fall will actually hit the entity.

pine oasisBOT
#

-# (helpers summoned) <@&1166082198152159386> <@&1202694677766348840>

astral ice
#

for random pattern you can use the /spreadplayers command on arrows

mortal lantern
#

i did not even know this was a command whoa

astral ice
#

look it up.. i used it before for exactly that.. the enchantment that summons cloud of arrows above the hit target

mortal lantern
#

so, not sure if these are the actual numbers i'll be using, but something like this?
/spreadplayers ~2 ~2 20 4 false @e[type=arrow]

mortal lantern
#

so, I've changed the function to this:

execute at @s run summon arrow ^ ^10 ^
execute at @s run summon arrow ^ ^10 ^
execute at @s run summon arrow ^ ^10 ^
execute at @s run summon arrow ^ ^10 ^
execute at @s run summon arrow ^ ^10 ^
execute at @s run summon arrow ^ ^10 ^
execute at @s run summon arrow ^ ^10 ^
execute at @s run summon arrow ^ ^10 ^
execute at @s run summon arrow ^ ^10 ^
execute at @s run summon arrow ^ ^10 ^
execute at @s run summon arrow ^ ^10 ^
execute at @s run summon arrow ^ ^10 ^
execute at @s run summon arrow ^ ^10 ^
execute at @s run summon arrow ^ ^10 ^
execute at @s run summon arrow ^ ^10 ^
execute at @s run summon arrow ^ ^10 ^
execute at @s run summon arrow ^ ^10 ^
execute at @s run summon arrow ^ ^10 ^
spreadplayers ~0 ~5 10 12 false @e[type=arrow]

unfortunately, it seems all of the arrows choose the same location. is there an example you could show me? @astral ice

astral ice
#

this is run as the player/entity that got hit (at their location)

mortal lantern