I need this code for my game MCU Combat. I need him to transform from
icon = 'main.dmi'
icon_state = "mob"
to
icon = 'main.dmi'
icon_state = "mob2"
thanks
*-*CodesterZ*-*
ID:177673
![]() Aug 12 2002, 12:16 pm
|
|
...how could you fail it? Show us one of your attempts.
(unless you were lying about trying it, which I would think you would include in your first post) |
here's one of the codes...
mob/proc/Evolve() if(usr.kills>=20) usr << "You evolved into MCU Level 2!" icon = 'main.dmi' icon_state = "mob2" |
Are you checking the user's kills periodically, because procedures aren't triggered automatically, you have to call them manually. Did you just expect this thing to happen when the user's kills exceded 20?
|
I think it should work. This is the code I used for Rise to Glory Level up.
mob/proc/Damage(var/mob/ch, var/dam) ch.health -= dam ch << "You take [dam] damage!" if(ch.health < 1) world << "[ch.name] has been killed by [usr]!!! You will Respawn in 10 seconds!!!" usr.kills += 1 ch.loc = locate(1,34,2) sleep(100) ch.loc = locate(28,31,2) ch.health = 100 return It worked on it's own why won't it work with some simple changes in my game. I have kills working... mob/proc/Levelup() if(usr.exp>= usr.lvexp) usr << "You Gained A Level!" usr.exp = 0 usr.health+=5 usr.maxhealth+=5 usr.level +=1 usr.strength+=1 usr.defense+=1 usr.Mana+=1 usr.MaxMana+=1 |
This is VERY simple, if you can define a verb, then you can do it. You already posted most of the work.