Moving Armor Stands

  • 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!

Status
Not open for further replies.

JackyBoy

Member
Feb 4, 2017
104
1
18
21
Hey there ok so to start off I think that this will be a complex skipt and any help would be appreciated. So I was wondering if there is a way that I can set an armor stand in several positions and then save/add their positions to a file by doing something like /armor stand save [name] and then it saves it. Then there is a command like /armor stand play [name] and what it does is it runs through all the positions I have set and teleports the armor stand to them.
So to clear everything up:
- A command that gets the cords that you put in or on an armor stand and saves them to a file, everytime you add a new position it will add a new line under the last.
- Once you have all the positions you can play the file, it will then run through each line with a wait time that you are able to change.
 
This code should give you an idea of how to do something like what you want.
code_language.skript:
command /example [<text>] [<number>]:
    permission: op
    trigger:
        if arg-1 is "setloc":
            wait 1 tick
            set {_n} to 0
            while metadata value "example" of player is true:
                set {armorstand::loc::%arg-2%::%{_n}%} to location at player
                add 1 to {_n}
                wait 1 tick
                # 1 tick for the smoothest possible teleportion. Uses the most data than any other ticks.
                # The more ticks there are, the farther the armor stand teleports from one location to the next.
            send "&aStopped!" to player

        if arg-1 is "stop":
            set metadata value "example" of player to false
            # Stops the while loop from setloc
 
Hey there ok so to start off I think that this will be a complex skipt and any help would be appreciated. So I was wondering if there is a way that I can set an armor stand in several positions and then save/add their positions to a file by doing something like /armor stand save [name] and then it saves it. Then there is a command like /armor stand play [name] and what it does is it runs through all the positions I have set and teleports the armor stand to them.
So to clear everything up:
- A command that gets the cords that you put in or on an armor stand and saves them to a file, everytime you add a new position it will add a new line under the last.
- Once you have all the positions you can play the file, it will then run through each line with a wait time that you are able to change.

sound like skcam


https://pastebin.com/EAgnMnvd


#edit.

btw next time under Request Section. you are requesting.
 
This code should give you an idea of how to do something like what you want.
code_language.skript:
command /example [<text>] [<number>]:
    permission: op
    trigger:
        if arg-1 is "setloc":
            wait 1 tick
            set {_n} to 0
            while metadata value "example" of player is true:
                set {armorstand::loc::%arg-2%::%{_n}%} to location at player
                add 1 to {_n}
                wait 1 tick
                # 1 tick for the smoothest possible teleportion. Uses the most data than any other ticks.
                # The more ticks there are, the farther the armor stand teleports from one location to the next.
            send "&aStopped!" to player

        if arg-1 is "stop":
            set metadata value "example" of player to false
            # Stops the while loop from setloc
I was looking for something like this for a while, how could I make it so I can setloc's and save the armorstand pos and it will teleport to the next loc and change into the other pos smoothly and then have a different arg run the whole setloc
 
Status
Not open for further replies.