Ok, I guess im a little rusty when it comes to coding, I dont know why this does it, and im hoping that someone who reads this can help me get by this. I tried to do this on a project which I was working on, and I noticed no matter how many ways I did it, the same thing happened.
First off, the vars..
mob/var/league
mob/var/special_ability
--------------------------------------------------------
and then the body of the code which is presented in the creating character proc, note that I left out the name process because that part works fine.. and the classes.. this is used with deadrons system.
mob/proc/CreateCharacter()
var/list/abilities1 = list("Power Shot", "Fortitude", "Dodge")
help_text = "What Special Ability would you like to obtain?"
default_value = "Fortitude"
var/special = input(src, help_text, prompt_title, default_value) in abilities1
switch(special)
if ("Power Shot")
special_ability = "Power Shot"
alert("You have Upgrades your Power Attack Ability by 20%")
if ("Fortitude")
special_ability = "Fortitude"
alert("You have Upgrades your Fortitude Ability by 20%")
if ("Dodge")
special_ability = "Dodge"
alert("You have Upgrades your Dodge Ability by 20%")
var/list/leagues = list("Wiegraff", "Grandolph")
help_text = "What Side to you wish to be Leagued with?"
default_value = "Wiegraff"
var/league = input(src, help_text, prompt_title, default_value) in leagues
switch(league)
if ("Wiegraff")
league = "Wiegraff" alert("You are now leagued with the great prince, Wiegraff!")
if ("Grandolph")
league = "Grandolph"
alert("You are now leagued with the all mighty Grandolph!")
Now, the problem with that is.. it didnt show up on my statpanel, I tried to make them procs, so league = "Grandolph" lets say would be
mob/proc/grandolph1()
league = "Grandolph"
and it would be called upon when you choose him as the leige.
-------------------------------------------------------
now, that I thought would work, because in the character creation it showed up on the statspanel, but when the player logged in.. it vanished.. any thoughts? I couldnt find nothing wrong with the code itself, or the vars that I was using.. thanks for taking your time in reading all of this!
ID:150259
Nov 19 2001, 12:23 pm
|
|
In response to Skysaw
|
|
customized stats panel? ...
mob/ Stat() statpanel("Stats") statpanel("Items", src.contents) stat("Name:","[src.name]") stat("Class:","[src.class]") stat("Life Force:", "[num2text(src.health,30) ]/[num2text(src.maxhealth,30) ]") stat("Energy:","[num2text(src.energy,30) ]/[num2text(src.maxenergy,30) ]") stat("Armor:","[num2text(src.armor,30) ]") stat("Money:", "[num2text(src.money,30) ]") stat("") stat("Leige:", "[league]") stat("Special Ability:","[special_ability]") what else is there besides that? |
In response to Goku401
|
|
You need to move the second statpanel() below all the stat()s because you're defining them in the items statpanel().
|
In response to Nadrew
|
|
thanks for pointing that out I guess, but thats not the problem.. it still shows up under stats instead of items, what I am trying to figure out is why my variables vanish after the player logs in and if there is any way around that or a correct way of doing what I did with the character creation.
|
In response to Goku401
|
|
possibly the way you are saving the mob's?
are they vanishing when you load a character? or make a new one? FIREking |
In response to FIREking
|
|
well, both, when I create a character they show up in the character making part when I choose them, but when the player actually logs in and when it displays the login proc and all about world << [usr] has entered the realm of [game name], it disappears, when I relog in its not there.. I was wondering if the code itself was right.. and if they werent correct how would I go about by fixing them? I just started on the game then I notice that the same problem shows up, lol.. and yet I dont know what the problem is unfortunetely, because the code looks generally right to me..
|
Do you have a customized stat() procedure?