ID:162523
Dec 27 2007, 8:28 am
|
|
i notice most of the games on byond have hair colors? Am i right? So do really have to add all the diffrent hair colors or is just something in the DM that does it?
|
Usually it is an overlay.
Create an icon file with different states, all of hair colors of varying hue. Set it as an overlay, I do this usually by: [code] obj overlay BrownHair icon = 'brownhair.dmi' icon_state = "BrownHair" [/code] Now, you need to create a proc or verb that sets the overlay based on a condition. Like, for example mob/Login(). [code] mob Login() var/haircolor = input ("What color hair would you like?") in list ("Blonde","Brown","Bald") if(haircolor == "Blonde") HairIsBlonde() else if (haircolor == "Brown" HairIsBrown() else Bald() [/code] [code] mob proc HairIsBrown() src.overlays += /obj/overlay/BrowHair [/code] |
In response to DisturbedSixx
|
|
You can do it programmatically using either icon arithmetic or icon.Blend() and rgb'd colours.
|
In response to Hazman
|
|
Just make them type it in as a number. Most games do that.
|
In response to Zuglilth
|
|
BBCode does not work on these forums. HTML tags are used (to an extent, of course). For posting code, use the <DM></DM> tags.
|
It has something to do with RGB colors I think.