if("Water")
var/Poke_Prob3 = rand(1,10)
src.Type = "Water"
if(Poke_Prob3)
new_mob = new /mob/player/Pokemon/Squirtle
if(Poke_Prob3 == 2)
new_mob = new /mob/player/Pokemon/Tododile
if(Poke_Prob3 == 3)
new_mob = new /mob/player/Pokemon/Dratini
if(Poke_Prob3 == 4)
new_mob = new /mob/player/Pokemon/Seel
if(Poke_Prob3 == 5)
new_mob = new /mob/player/Pokemon/Mudkip
if(Poke_Prob3 == 6)
new_mob = new /mob/player/Pokemon/Horsea
if(Poke_Prob3 == 7)
new_mob = new /mob/player/Pokemon/Psyduck
if(Poke_Prob3 == 8)
new_mob = new /mob/player/Pokemon/Marill
if(Poke_Prob3 == 9)
new_mob = new /mob/player/Pokemon/Politode
if(Poke_Prob3 == 10)
new_mob = new /mob/player/Pokemon/Tentacool
if(Poke_Prob3 == 11)
new_mob = new /mob/player/Pokemon/Poliwag
Problem description:I have a pokemon game with some kool features coded in but the next thing I wanna add are attacks but whenever I make it so when u pick you wanna be a water type I made a var called mob/var/type = ""
And when you select water I put src.type = "Water" but when I finished creating my character the var was src.type = "" how do I make it so it keeps the var I really wanna add attacks like water gun,hydro pump,etc.(I got 0 Errors and 0 Warnings)
Additionally: if(Poke_Prob3) will be true if Poke_Prob3 is anything but 0, and so you'll be creating a Squirtle every single time, regardless of what should be being created.