ID:149270
 
I want to have overlays set up into groups like shirts, hair, pants. That way when the user wants like a different hair style or something the previous one wont clash with the new one, say you have an afro now the person wants a shorter hair cut. If you just add a new overlay you will still see the afro in the back. I also want it grouped so I can remove the hair type overlays but shirts and pants will stay the way they are. I tried just having something like this but it didnt work.


obj
hair
afro
icon = 'afro.dmi'
short
icon = 'shortHair.dmi'
shirts
shortSleeve
icon = 'sSleeveShirt.dmi'

mob/verb
get_afro
usr.overlays -= /obj/hair
usr.overlays += /obj/hair/afro
get_short_hair
usr.overlays -= /obj/hair
usr.overlays += /obj/hair/short
get_shirt
usr.overlays -= /obj/shirts
usr.overlays += /obj/shirts/shortSleeve
i cant see y that dont work, sorry. wen i did that i made remove verbs for every overlay, you could do that then plus the one you want
In response to mazarot
nope because then any clothes they have on would get removed along with the hair or whatever, and i dont want to set it up as an inventory type thing i just want them to keep whatever they got and not remove it
In response to Netshark010101
Here's an idea. Have a list of all the hairs you can have. Then, for(var/H in HairList) overlays -= H Ok, so that's not the valid syntax, but you know what I mean. Right?
In response to Garthor
umm no not really no. I tried to get something from it but it didnt work, can you show me a better example?