ID:267811
 
I'm trying to make it so that the player can choose what class he has. so far i have:
mob
var
Lvl = 1
HP
Max_HP
MP
Max_MP
Str
Def
Agl
MndStr
MndResist
var/class
icon = 'player.dmi'
Warrior
icon_state = "warriormale"
HP = 75
Max_HP = 75
MP = 0
Max_MP = 0
Str = 65
Def = 65
Agl = 35
MndStr = 35
MndResist = 35
Mage
icon_state = "magemale"
HP = 25
Max_HP = 25
MP = 15
Max_MP = 15
Str = 5
Def = 5
Agl = 10
MndStr = 15
MndResist = 15
Cleric
icon_state = "clericmale"
HP = 40
Max_HP = 40
MP = 13
Max_MP = 13
Str = 7
Def = 7
Agl = 13
MndStr = 10
MndResist = 13
Login()
var/mob/newm
var/mob/class
class = input("What class do you want?")in list("Warrior","Mage","Cleric")
switch(class)
if("Warrior")
newm = new /mob/Warrior()
if("Mage")
newm = new /mob/Mage()
if("Cleric")
newm = new /mob/Cleric()
usr.client.mob = newm
..()
it doesn't work and i dont know what is wrong.
someone help me
it only shows a black screen
Ok keep the var at the top but bring the classes down to the bottom under the selection and tell me if that works.
In response to Darkfirewolf5
i dont know what you're talking about. i dont see how that will help.
In response to Dark Weasel
mob
var
Lvl = 1
HP
Max_HP
MP
Max_MP
Str
Def
Agl
MndStr
MndResist


Login()
var/mob/newm
var/mob/class
class = input("What class do you want?")in list("Warrior","Mage","Cleric")
switch(class)
if("Warrior")
newm = new /mob/Warrior()
if("Mage")
newm = new /mob/Mage()
if("Cleric")
newm = new /mob/Cleric()
usr.client.mob = newm
..()

var/class
icon = 'player.dmi'
Warrior
icon_state = "warriormale"
HP = 75
Max_HP = 75
MP = 0
Max_MP = 0
Str = 65
Def = 65
Agl = 35
MndStr = 35
MndResist = 35
Mage
icon_state = "magemale"
HP = 25
Max_HP = 25
MP = 15
Max_MP = 15
Str = 5
Def = 5
Agl = 10
MndStr = 15
MndResist = 15
Cleric
icon_state = "clericmale"
HP = 40
Max_HP = 40
MP = 13
Max_MP = 13
Str = 7
Def = 7
Agl = 13
MndStr = 10
MndResist = 13

Thats what he means... I think, try it.
        Login()
var/mob/newm
var/mob/class
class = input("What class do you want?")in list("Warrior","Mage","Cleric")
switch(class)
if("Warrior")
newm = new /mob/Warrior()
if("Mage")
newm = new /mob/Mage()
if("Cleric")
newm = new /mob/Cleric()
newm.loc = locate(1,1,1)

/*You HAVE to set the loc. You can do this in the () of the
new above, but otherwise newm is sitting in limbo.
Since it's sitting in limbo, and not on the map, you see a
black screen when you change the client's mob to newm */


usr.client.mob = newm
..()
In response to Auron Tyraan
i had 2 problems with the program.
the first one was solved
but the second one is repetition. it always repeats after you select ur class