How to make dogs sitting/standing with a command?

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

EricDasBrot

Member
Jun 1, 2017
26
0
0
28
hello, i want to loop all dogs with a specific name and make them sitting/standing. i really don't know how to explain it

Code:
command /dog:
    loop entities:
        if name of loop-entity is "&aDog":
            if loop-entity is sitting:
                make loop-entity standing
                
            if loop-entity is standing:
                make loop-entity sitting
 
You can do that by editing the wolf's NBT data, specifically the Sitting tag. Set the Sitting tag to 1 if you want the dog to be sat, and 0 if you want the dog to be standing. To edit NBT data of entites, look into NBT editing in Skript. A quick google search will help you out!
 
You can try doing it with Skript-Mirror
code_language.skript:
command /dog:
    loop entities:
        if name of loop-entity is "&aDog":
            if loop-entity.isSitting() = true:
                loop-entity.setSitting(false)
            else:
                loop-entity.setSitting(true)
 
Status
Not open for further replies.