I want to spawn an armor stand and a chicken, and make the armor stand follow the chicken. what I've done is this:
Unfortunately, it doesn't know what {_chicken} is, and I'm not sure how to work around this. How can I get this to work? There will only ever be 1 armor stand, so looping all armor stand will only loop the one anyways.
Code:
command /spawn:
description: Spawns the armor stand and chicken.
usage: /spawn
executable by: players
trigger:
spawn armor stand at location(54, 96, -11.5, world "world") with nbt compound from "{Marker:1}"
set {_armorstand} to last spawned armor stand
spawn chicken at location(54, 96, -11.5, world "world")
set {_chicken} to last spawned chicken
every 1 tick:
loop all armor stands:
teleport loop-armor stand to location of {_chicken}
Unfortunately, it doesn't know what {_chicken} is, and I'm not sure how to work around this. How can I get this to work? There will only ever be 1 armor stand, so looping all armor stand will only loop the one anyways.