ID:159365
 
Ok i have no clue on how to make this work.

I want it that when u click the Colour on the screen it makes your hair that colour.

for example i picked my hair 2 be Spiked.

Then i click the turf which is Purple, then my hair changes to purple. How do i do that?
For the colour pick, I assume you are talking about "input(...) as color"

When you get the hex form of the colour chosen (either through the above method or using the old rgb() procedure), you would want to use one of the icon operators, such as icon.Blend().

mob/verb/Colour_Me_X()
var/RGB = input(src,"Wha j00 wana b?", "ClR") as color
var/icon/I = new(src.icon) // new /icon instance
I.Blend(RGB, SUBSTRACT) // Pick the appropriate arguments
src.icon = I // Sets the new "colour"
src << "j00 ben changed!!!1!one1! Teh prce for thee is THY SOUL! MWAHAHAHA"
del src // Your soul has been taken... be happy it wasn't your key. BYOND > Your soul :P
In response to GhostAnime
Assuming thats to prevent people from copy and pasting code :P
In response to Yash 69
No, just from boredom. I didn't test it so I doubt it works >_>
In response to GhostAnime
nah thats not exactly what i meant...The turf colour is purple, so when u click the purple turf your hair changes 2 purple
In response to Blip182
In that case, you still need to use icon.Blend(), though this time you may want to use the rgb() procedure... and, of course, Click()
In response to GhostAnime
GhostAnime wrote:
In that case, you still need to use icon.Blend(), though this time you may want to use the rgb() procedure... and, of course, Click()

Thanx alot for all the help. i really appreciate it.