Solved Dog Collar

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

    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.

HiddenDev

Member
Sep 19, 2017
43
2
0
I'm was wondering if there was anyway to set a wolfs collar to a different colour on spawning of it.

Basically if the player does the command /test it will spawn a dog tamed and sets it to a different colour.

code_language.skript:
command /test:
    trigger:
        spawn 1 wolf at location of player
        set name of spawned entity to "&f%player%'s Dog"
            tame last spawned wolf to player
            #collar set here.
 
I'm was wondering if there was anyway to set a wolfs collar to a different colour on spawning of it.

Basically if the player does the command /test it will spawn a dog tamed and sets it to a different colour.

code_language.skript:
command /test:
    trigger:
        spawn 1 wolf at location of player
        set name of spawned entity to "&f%player%'s Dog"
            tame last spawned wolf to player
            #collar set here.

code_language.skript:
Add "{CollarColor:11}" To nbt of last spawned entity
 
Just to make things a bit more english
code_language.skript:
function setCollarColor(wolves: living entities, color: color):
  set {_color} to {_color}.getDye()
  loop {_wolves::*} where [entity input is a wolf]:
    try loop-value.setCollarColor({_color});

usage:
setCollarColor(all wolves, pink)
 
Status
Not open for further replies.