Solved Checking location for armorstand

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

Gecky

Member
May 22, 2019
15
0
0
36
So the goal of the skript is to have the armorstand spawn if there isn't already one. I have it so it spawns when the command is triggered but how would I check the location of the coordinates for an armorstand before spawning it. And if there is an armorstand already there, it will not spawn one. Thanks!

Code:
command /spawnbag <text>:
    trigger:
        if arg 1 is "1":
                execute console command "/summon armor_stand 214 64.5 258 {DisabledSlots:2039583,Invisible:1b,Invulnerable:1b,NoBasePlate:1b,NoGravity:1b,Rotation:[46f],ArmorItems:[{},{},{},{id:""skull"",Count:1b,Damage:3b,tag:{SkullOwner:{Id:""ef4aaca9-1624-6389-14f2-6b91655a7cb9"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGNiM2FjZGMxMWNhNzQ3YmY3MTBlNTlmNGM4ZTliM2Q5NDlmZGQzNjRjNjg2OTgzMWNhODc4ZjA3NjNkMTc4NyJ9fX0=""}]}}}}],HandItems:[{},{}]}"
[doublepost=1558666365,1558573079][/doublepost]bump
 
code_language.skript:
command /spawnbag <text>:
    trigger:
        if arg 1 is "1":
            set {_loc} to location at 214, 64.5, 258 in world "world"
            loop all entities in radius 1 of {_loc}:
                if "%loop-entity%" is "armor stand":
                    stop
            execute console command "/summon armor_stand 214 64.5 258 {DisabledSlots:2039583,Invisible:1b,Invulnerable:1b,NoBasePlate:1b,NoGravity:1b,Rotation:[46f],ArmorItems:[{},{},{},{id:""skull"",Count:1b,Damage:3b,tag:{SkullOwner:{Id:""ef4aaca9-1624-6389-14f2-6b91655a7cb9"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGNiM2FjZGMxMWNhNzQ3YmY3MTBlNTlmNGM4ZTliM2Q5NDlmZGQzNjRjNjg2OTgzMWNhODc4ZjA3NjNkMTc4NyJ9fX0=""}]}}}}],HandItems:[{},{}]}"
 
Thank you! Also just a side question, do you know how to make a leather helmet be dyed red inside of a GUI?
 
Status
Not open for further replies.