ID:165793
 
i was trying to put a aging system in my game where there are different chances to be a different icon when you go to a certain age but i cant figure out how heres what i got now

mob
proc
Age(mob/M as mob)
for() //loop this action
M.age += 1 // add 1 to the age of M
switch(M.age)
if(15 to 30) // if they are 6 to 12
usr.icon_state = "Hawkmon"// child picture if 6-12
if(30 to 50)//if they are 13 to 187
usr.icon_state = "Wizardmon" // teenager picture if 13-17
if(50 to 80)//if they are 18 to 49
usr.icon_state = "Mamemon"// adult picture if 18-49
if(80 to 120 )//if they are 50 to 70
usr.icon_state = "Wargreymon"// old picture if 50-70

sleep(16)//number of seconds for a year
I'll show you what I used in my game, It uses levels instead of age, but could be switched. The below is in a proc called after leveling up.
mob/proc
Evolve(mob/player/M)
if(src.icon_state == "skeleton")
if(src.Level >= 20)
world<<"<font color=green><b>[src]:<font color=red><b> Is evolving!</font></b>"
sleep(30)
src.icon_state = "skeleton2"
world<<"<font color=green><b>[src]:<font color=red><b> Is now a SkeliMage!</font></b>"
src.name="[src.aname] the SkeliMage"


You could have it just check the age instead of the level. If i'm guessing right, your using the age system like on digimon wild. I know that age system increases the age depending on the player's level. So you could just have it call the above proc during the leveling up proc.
In response to FriesOfDoom
i learned the aging thing from that demo when you age with time not level
In response to Flamemon
if you are trying to make it so that the play may or may not digivolve, then:
if(prob(#))

....should help, just make sure you change "#" to the percent of probabilty the character will digivolve to that.