ID:140572
 
Code:
mob/Login()
..()
usr.loc=locate(10,6,2)
usr.move=0

mob/proc/Character_Creation()
var/prompt_title = "Name"
var/help_text = "What is your name? "
var/default_value = key
var/mob/new_mob
var/char_name = input(src, help_text, prompt_title, default_value) as null|text
switch(input("Which race do you perfer?","Race") in list("Demon","Saiyan-Jin"))
if("Demon")
new_mob = new /mob/characters/demon()
new_mob.race = "Demon"
new_mob.icon = 'maledemon.dmi'
new_mob.hair = "Bald"


Problem description:
This is my login code but when i login my character is invisible and does not appear as the icon assigned.
What is this new_mob?Is it src? Is it the player?Cause I don't see a correlation between player and new_mob.
In response to Gr1m d4 r34p3r
mob/Login()
..()
usr.loc=locate(10,6,2)
usr.move=1
mob/proc/Character_Creation()
var/prompt_title = "Name"
var/help_text = "What is your name? "
var/default_value = key
var/char_name = input(src, help_text, prompt_title, default_value) as null|text
var/mob/new_mob
switch(alert("What is your gender?","Character_Creation_Gender","Male","Female"))
if("Male")
switch(input("What is your race?","Character_Creation_Race") in list ("Saiyan_jin","Demon","Buu","Cell","Namek","Icer","Android"))
if("Saiyan_jin")
new_mob.icon=new/mob/characters/sayinjin()
new_mob.move=1
new_mob.race="Saiyan_jin"
new_mob.move = 1
new_mob.state = "Normal"
new_mob.talk=1
new_mob.will=1
new_mob.level=1
// switch(alert("What Skincolor do you want?","Skin") in list ("Light","Tan","Dark"))
// switch(alert("What Hairstyle do you perfer?","Hair") in list ("Goku","Vegeta","Gohan","Mohawk","VegetaGT","Spiky","Long","Short","Bald"))
if("Demon")
new_mob.icon=new/mob/characters/demon()
new_mob.move=1
new_mob.race="Demon"
new_mob.state = "Normal"
new_mob.talk=1
new_mob.will=1
new_mob.level=1
if("Female")
switch(input("What is your race?","Character_Creation_Race") in list ("Saiyan_jin","Demon","Buu","Cell","Namek","Icer","Android"))
if("Saiyan_jin")
new_mob.icon=new/mob/characters/sayinjin()
new_mob.race="Saiyan_jin"
new_mob.move = 1
new_mob.state = "Normal"
new_mob.talk=1
new_mob.will=1
new_mob.level=1
// switch(alert("What Skincolor do you want?","Skin") in list ("Light","Tan","Dark"))
// switch(alert("What Hairstyle do you perfer?","Hair") in list ("Goku","Vegeta","Gohan","Mohawk","VegetaGT","Spiky","Long","Short","Bald"))
if("Demon")
new_mob.icon=new/mob/characters/demon()
new_mob.move=1
new_mob.race="Demon"
new_mob.state = "Normal"
new_mob.talk=1
new_mob.will=1
new_mob.level=1

else
..()
new_mob.icon = new_mob.icon
new_mob.name = char_name
usr.client.mob = new_mob
world << "<tt><font color = green>{{**<font color = white>[src] has logged in!<font color = green>**}}</tt>"

It is the player, here is my full coding
In response to Tales2008
- you dont specify what the mob is when they click sayian or demon, u only do it in the else statement.

dont use 'usr' in procs either cuz it gets messed up when u wanna call the proc somewhere else.
                if("Saiyan_jin")
new_mob.icon=new/mob/characters/sayinjin()
new_mob.move=1
new_mob.race="Saiyan_jin"
new_mob.move = 1
new_mob.state = "Normal"
new_mob.talk=1
new_mob.will=1
new_mob.level=1
new_mob.icon = new_mob.icon
new_mob.name = char_name
src.client.mob = new_mob

Now it will show

In response to Agrey123
mob/Login()
..()
usr.loc=locate(10,6,2)
usr.move=1
mob/proc/Character_Creation()
var/prompt_title = "Name"
var/help_text = "What is your name? "
var/default_value = key
var/char_name = input(src, help_text, prompt_title, default_value) as null|text
var/mob/new_mob
switch(alert("What is your gender?","Character_Creation_Gender","Male","Female"))
if("Male")
switch(input("What is your race?","Character_Creation_Race") in list ("Demon","Sayan_Jin"))
if("Demon")
new_mob.icon=new/mob/characters/demon()
new_mob.icon='maledemon.dmi'
new_mob.race="Demon"
new_mob.state = "Normal"
new_mob.will=1
new_mob.level=1
new_mob.icon = new_mob.icon
new_mob.name = char_name
src.client.mob = new_mob
if("Female")
switch(input("What is your race?","Character_Creation_Race") in list ("Demon","Sayan_Jin"))
if("Demon")
new_mob.icon=new/mob/characters/demon()
new_mob.icon='maledemon.dmi'
new_mob.race="Demon"
new_mob.state = "Normal"
new_mob.will=1
new_mob.level=1
new_mob.icon = new_mob.icon
new_mob.name = char_name
src.client.mob = new_mob
else
world << "<tt><font color = green>{{**<font color = white>[src] has logged in!<font color = green>**}}</tt>"


Nothing Happened, i still dont see my player.
In response to Tales2008
All of you seem to be missing that he's not calling the proc when he logs into the game.

mob/Login()
..()
src.loc = locate(10, 6, 2)
src.move = 1
src.Character_Creation()
In response to Axerob
Axerob wrote:
All of you seem to be missing that he's not calling the proc when he logs into the game.

> mob/Login()
> ..()
> src.loc = locate(10, 6, 2)
> src.move = 1
> src.Character_Creation()
>


yea i am calling the program in a different way. I have a title so i use a turf to do it.
turf/creatingcharacter
Click()
usr.Character_Creation()
var/turf/first_location = locate(53,232,1)
usr.loc = first_location