I can't help but feel like you picked a horrible source to learn from. You'd get a lot farther taking, say, one of Forum_Accounts' many frameworks and whipping that into a DBZ game if that is what you wish.
                    if("Saiyan")
mobcreation = new /mob/PC()

var/which_gene = pick("rage", "train", "legend", "god")
if(which_gene == "rage")
mobcreation.rage_chromosome = 1
if(which_gene == "train")
mobcreation.train_chromosome = 1
if(which_gene == "legend")
mobcreation.legend_chromosome = 1
if(which_gene == "god")
mobcreation.god_chromosome = 1

mobcreation.race = "Saiyan"
mobcreation.powerlevel = 200
mobcreation.powerlevel_max = 200
mobcreation.strength = 15
mobcreation.strength_max = 15
mobcreation.overlays += tail
mobcreation.Skin()
mobcreation.Hair()
mobcreation.Karma()


Does this do what you wanted? It should be easy to see how this code works.

Edit: yes, I could use switch, but everyone understands if, and not everyone understands switch or even "else if".
In response to Immibis
Then we should aim to teach, not give the sub-standard pieces just to appease their limited knowledge.

Maybe one day he might be able to know what this means:

mobcreation.vars["[pick("rage","train","legend","god")]_chromosome"] = 1
Once you understand "if" and "else", "else if" is simple to learn. Once you understand "else if", "switch" is simple to learn.

Throwing pieces of code like:
mobcreation.vars["[pick("rage","train","legend","god")]_chromosome"] = 1

at someone is not going to help them learn. If you do that, they are more likely to copy-paste it than to read it and understand how it works.
You cam do mob.vars to access their vars?


^ mind blown
In response to Immibis
I don't recall saying that he needed to use that.

I was just suggesting that instead of giving him something we know he understands (Well, assume), we should give him something slightly more challenging (Not like my snippet, which is why I said "Maybe one day he might be able to know what this means") so that he has a learning experience.

If you are going to argue against my suggestion, I at least ask you to read thoroughly and understand my point before you do so, so we avoid misunderstandings. Feel free to ask questions.
Page: 1 2