ID:267014
 
Hi I am a newbie.I was wondering how you would do a character choice.So far i have:
mob
Login()
switch(input("What char","Character Choice")in list("Aragonian","Imperial","Sires")
if("Aragonian")
But I have no idea what to do after the if("Aragonian") to make that user the aragonian mob.

ps:By the way I am sorry about selling ripped icons.
Big Head1912 wrote:
Hi I am a newbie.I was wondering how you would do a character choice.So far i have:
mob
Login()
switch(input("What char","Character Choice")in list("Aragonian","Imperial","Sires")
if("Aragonian")
But I have no idea what to do after the if("Aragonian") to make that user the aragonian mob.

ps:By the way I am sorry about selling ripped icons.

you probably dont need the if statement try this.

mob
Login()
..()
src.loc = locate(x,y,z)
loadSpecificVars(src)
src.icon_state = input("Choose your path.") in list ("path 1","path 2")


just make sure your icon state is the same as your chosen path i.e icon_state = Aragonian

later if you want different var for each you could use the if statement to add them at the Login() like so.

mob
Login()
..()
src.loc = locate(x,y,z)
loadSpecificVars(src)
src.icon_state = input("Choose your path.") in list ("path 1","path 2")
if("path 1")
intel += 5
if("path 2")
str += 5
In response to Treasurecat
Unfortunately, setting the icon_state and some vars isn't enough. You might have two vastly different types of classes and such. You can set usr.client.mob to something else. Just make sure that the Login() procedure for selecting a certain class is under mob/Login or whatever, or you override it for the mob/Whatever, otherwise you get an infinite loop. EX:

BAD:

mob
var/intelligence
var/charisma
Login()
src.client.mob = input("Class") in list(/mob/Ugly,/mob/Stupid)
Ugly
charisma = 0
Stupid
intelligence = 0

GOOD:

mob
var/intelligence
var/charisma
LOGIN
Login()
src.client.mob = input("Class") in list(/mob/Ugly,/mob/Stupid)
Ugly
charisma = 0
Stupid
intelligence = 0
world
mob = /mob/LOGIN