Solved How do I teleport a specific armor stand to a specific chicken?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Egg_Spoon

Member
Jan 24, 2023
2
0
1
23
I want to spawn an armor stand and a chicken, and make the armor stand follow the chicken. what I've done is this:

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.
 
I want to spawn an armor stand and a chicken, and make the armor stand follow the chicken. what I've done is this:

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.
Its cause anything that starts with _ only works in that event but I can't give you code rn cause I'm on a phone