Solved how to set citizen age and color of sheep

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

jomjonejame

Member
Jan 26, 2017
54
1
8
29
how to set citizen age and color of sheep

code_language.skript:
command /sheep:
   trigger:
      create a citizen named "Sheep Red" at location of player as a sheep
 
citizens entities can be edited normally as normal mobs I think(based on that I can edit the player npcs) so you could do something like:
loop all entities in radius 1 of block at location of player:
loop-entity is a sheep
do something

probably can be done without a loop, but I don't remember citizens syntaxes ^
 
I guess something like
code_language.skript:
add "{Color:10b}" to nbt of entity from {_npc}
 
What do you mean with keep value?
 
You can see which colors are which numbers here, and then its its {Color:numberb}
 
Oh lol, I didn't know you were able to change it that way, sorry
 
Thank you for help me.
code_language.skript:
loop all entities in radius 5 of block at location of player:
                            if loop-entity is a sheep:
                                if name of loop-entity is "Slots (%{_id}%)":
                                    set age of loop-entity to baby
                                    set the color of the loop-entity to {_color}
 
Status
Not open for further replies.