ID:261439
Mar 29 2002, 4:21 pm
|
|
how do i make it so if you are playing the game your characters icon changes to a older one i.e. if you are 2 you grow to 6 then to three and the icon changes with it. please help.
|
In response to Foomer
|
|
thats good but i need to know how to put that in affect
|
Knuckles skater wrote:
how do i make it so if you are playing the game your characters icon changes to a older one i.e. if you are 2 you grow to 6 then to three and the icon changes with it. please help. There are a few ways to do this..so heres one easy way: mob/var/age mob/UpdateAgeIcon() src.icon_state = "[age]" Then just call UpdateAgeIcon() to update age. If you want it to change only at a cetain age..do this: mob/var/age mob/UpdateAgeIcon() if(src.age == 20) src.icon_state = "20" else if(src.age == 50) src.icon_state = "50" etc..Theres more ways of doing it, but this should do to show you. |
In response to Foomer
|
|
Actually Foomer I like this idea.
icon_state = num2text(src.age) Borrowed from Gughunter' SidewalkSanta's code. You really should read it. If you try to understand it you can learn a lot. |
In response to Exadv1
|
|
How is that way better than Foomers again?
From what I can see you just added an extraneous "src." and added in a proc call that has a rather long name. |
Then, whenever a character ages, change their icon state to their age like this:
icon_state = "[age]"