ID:1398513
 
(See the best response by Spunky_Girl.)
Im wondering how do you code a grid like hair pick and color system like I could add all the hairs to the grid but how do I make it so I can click the hair then have it ask me how I want it colored without it making the hair itself in the grid colored? Also would it mae the hair itself on the character ask me to color it if i clicked it when its on my character?

Best response
Let's break that up into different tasks to be accomplished one at a time...

1. Compile grid full of hair objects
2. Show grid to the player
3. Player Click()s on hair to buy/select
4. Click() will allow player to choose a color
5. Apply color to a NEW instance of selected hair

Task #1
Now let's start with the first task - "Compile grid full of hair objects". I have a feeling once you can get this done, then the rest will be easy as pie. So you obviously want a grid element, which means utilizing Dream Maker's skin editor. Your next step is to use the output() proc to put each hair object into the grid element through the use of a loop that can increment an x-value for the grid. The following DM box has the format you need for the output() proc and an example to help you along.
//format: output(atom, window.control:y,x)
src<<output(hair_object, "window.grid:1,1")


Task #2
Now that you've hopefully gotten a fully functional grid to work, we can show that window the grid resides in, to the player. For that, we use the winshow() proc. Easy enough.

Task #3
You want players to be able to Click() the hair in the grid for them to select it. Using the Click() proc we an accomplish this. Just make sure to have a check at the start of the Click() proc to check if the hair object is inside the correct kind of mob to prevent the Click() proc from clashing with other similar calls.
//simple checking example
obj/hair/Click()
if(istype(src.loc,/mob/vendor))
//do stuff here


Task #4
When the player clicks on the hair object, have them select a color using the input() proc's color assignment.
var/color = input(player,"Select a color","Hair Color") as null|color
if(color)
//do stuff


Task #5
Here you want to create a new hair object of the same type as the one clicked on, and apply the color selected in Task #4. Here you can use the icon Blend() proc.
um one thing i probly should mention is that the creation screen itself is a pane and totally made form the interface functions it's not a normal on map made creation screen and the map with all the character/stats etc appear after this creation is finished
Excellent. What I posted implies that you use the skin editor anyways :) (well actually, it kind of TELLS you to use it haha)
so how do I prevent the obj in the grid from changing color? and how would I save the picked choices/color for the hair to be applied on login?
It is all explained in each task. You would save the choices and such using variables.
so im guessing this would basically be it?
obj/hair/Click()
if(istype(src.loc,/mob/vendor))
var/color = input(player,"Select a color","Hair Color") as null|color
if(color)
var/hairtype="whatever hair u want"

then on login itd basically put the overlay on your char equal to the hairtype var and the color var?
How you go about handling your overlays and saving is entirely up to you. All you have to do is keep track of what color they choose (if they choose one), and then make a new hair object that will be added to the player's overlays with the modified color using the icon proc Blend().

One thing I should note is that if you use Blend() to change the color, the icon should be black by default, otherwise adding color to a red (or whatever other color) icon could produce unwanted colorations.