//-----------------------------------------------------------------
mob
var
Eyes // Define a couple of description variables, for the tutorial's sake.
Hair
choices // This defines the type of mobs that you can choose.
icon = 'base.dmi' /* All of the following mobs will have this icon. No need to do it multiple
times, so I just define it at the base.*/
Boy // More choices. You can change these to your desire.
Girl
verb
Look_at(mob/M as mob in oview(1)) // Make the 'Look at' verb require an arguement of a mob who is one space away from you.
src << "You look at [M]."
src << "[M] has [M.Eyes] eyes, and [M.Hair] hair." // Display the target mob's variables to whoever used the verb.
login_mob // This is the login mob.
Login() // Now is when the fun begins. This is the Login() proc that is called when login_mob logs in.
var/mob_path = "mob/choices/" // This is where we define the path for the race selections.
var/choice = input("Please select a skintone") in list ("White","Tan","Dark"," ") // Defines the variable 'choice' to what they choose.
mob_path += choice // Add their choice to mob_path, making it the mob they want.
var/mob/choices/new_mob = new(mob_path) // This creates the mob of choice, and defines the reference as 'new_mob'
new_mob.icon_state = choice // Appoint the correct icon state to it.
new_mob.Eyes = input("Please select your eye color.") in list ("Blue","Green") // This, as you've probably figured out, sets new_mob's Eyes variable, to the selection made.
new_mob.Hair = input("Please select your hairstyle.") in list ("Black","Blonde") // This does the same as above, but with their Hair variable.
new_mob.name = input("Please select a name.") as text // This will prompt the user to select a name for the new mob.
src.client.mob = new_mob // This sets the person who logged in's mob to new_mob, making them the mob they've just customized.
del(src) // No need for the emp
turf/grass/icon = 'grass.dmi' // Defines a grass turf.
world
mob = /mob/login_mob // This define the mob that the users are set to, when they first log in.
turf = /turf/grass // Define the default turf for the world.
Problem description:
For some reason when i select a hairstyle/color, when i spawn into the game theres nothing there, as in, the hair icon i used does not appear in game