What i'm trying to achieve is the ability for a player to choose a hair style then picks its colour themselves.
However I wan't this to only happen once they have triggered the equipped proc which would be overridden.
However I don't fully understand whats going on and i've seen a few ways of doing things.
Here is my code for reference;
hair3
name = "Afro"
icon_state = "hair1-standing"
description = "Afro Hair"
overlay_state = "hair1"
overlay_layer = 6
map_state = "hair1-standing"
icon = 'hairs.dmi'
overlay_icon = 'hairs.dmi'
map_icon = 'hairs.dmi'
slot = HAIR
Click()
usr.equip(new /item/hair1())
usr << usr.sound_effect('boop.wav')
equipped(mob/m)
m.overlay(src)
unequipped(mob/m)
m.remove(src)
Ive seen some people do
overlays += setcolor
And have setcolor set by an input("pick a color", "color", setcolor) as color
However when I do this I am left with a blank Icon, I think its because of the different Icon states that i'm using for movement and other actions.
I've also seen people do some kind of blend
Blend(icon, add, rgb etc etc
And I have no idea how blends works and yet to find an example.
I was wondering if you guys could explain how coloring an icon works, do you "Add" a solid color to the icon file and paste that over another icon on a higher layer.
Or do you change the hue of already existing colours?
And how would I get it working for that hair item described above?
Thanks in advance! (Sorry for being such a pain)