ID:1889832
 
(See the best response by Zecronious.)
I want to make it where I click a button to set the hair color then I click the button of the Hair style so when i login it gives me the overlay of the colored hair

Let me plug that into the search bar for you.

http://www.byond.com/developer/?text=hair+color
the demo wasnt what i was looking for
In response to Mastergamerx
Best response
where I click a button to set the hair color then I click the button of the Hair style so when i login it gives me the overlay of the colored hair

    var/list/Hairs=list("Spiked"='hair.dmi',"Short"='hair2.dmi')
var/hairChoice = input("Witch hair","hair type") in Hairs
var/color=input("Please select a color.") as color
var/hairer = Hairs[hairChoice]
hairer += color
usr.hair= hairer
usr.overlays+= usr.hair

Correct me if wrong but it does exactly what you asked.
no because i want to be able to click buttons for the hair this gives me a list instead
In response to Mastergamerx
It's not very difficult to go from that to buttons. If you know how buttons work then it should take you 2 minutes.
obviously i wouldnt be posting on a forum asking for help if i knew how
In response to Mastergamerx
For my two cents, I've always hated additive color. I'd much rather have either two icons--one for the color shades and one for the highlights--or a single icon that can be split via MapColors() for the same purpose.

The shading icon is shades of white and gray, that gets multiplied by the color, and then highlights are added after. As a bonus, if you strictly use a shading icon, you can just use atom.color and be done with it, no icon manipulation required. As a further bonus, you could add an overlay with atom.blend_mode = BLEND_ADD to use highlights and still avoid icon manipulation.
I ge thow to click a button and make it pick a color for the hair. I dont get how im supose to make a button that sets the hair to have colored applied to it
In response to Mastergamerx
Mastergamerx wrote:
I ge thow to click a button and make it pick a color for the hair. I dont get how im supose to make a button that sets the hair to have colored applied to it

The question is, what do you want the UI to look like and what do you want to happen, step-by-step?
I don't know what all the fuss is
For a simple solution exists
An input mode
Written in code
Is enough to get you in biz

var/colour = input("What colour do you want") as color


No fussing about with adding
Such efforts are simply for badding
It's easier to show
Colours we all know
Which to players is certainly gladdening
All I want is to click the hair color button pick a color then click w/e button I choose for the hairstyle I want then when I finished the character creation on loading into the game it gives me the hair i picked in the color i picked
In response to Mastergamerx
I have no idea why you're displeased
I gave you the solution, not teased
The button you'll click
The colour you'll pick
Nary a qualm's not been ceased.
*facepalms* All I need is the code for how do I make it so when a press a button it'll set a var to a hairstyle so I can apply the color to it
In response to Mastergamerx
If you have a button for each hairstyle, it'd be as simple as having a single hairstyle verb that takes a number or a string, then updating accordingly.

mob/var/hairoverlay
mob/var/hairstyle
mob/var/haircolor

mob/proc/RefreshHair()
// build the overlay, color it, etc.
...

mob/verb/HairStyle(style as text)
hairstyle = style
RefreshHair()
I left you the code 2 posts ago
Is it that hard to read my post, yo?
This is a bother,
YOU INPUT A COLOR
Zip zip, you're ready to go
so for the refresh hair it should be
if(hairstyle=="style1")
icon='hair1.dmi'

like that i think part im stuck at is how do I put the icon part properly to be assigned to w/e selected
In response to Lugia319
Lugia319 wrote:
I have no idea why you're displeased
I gave you the solution, not teased
The button you'll click
The colour you'll pick
Nary a qualm's not been ceased.

Lugia319 is both a developer and a rapper. Any who, this solution is what you want, at least at the most basic and simplest level. If you want to get fancy, I suggest you follow Lummox JR's example. Message me if you are still having issues.
I figured it all out via a modification to a source codes hair system
Page: 1 2