ID:177673
 
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*-*
... have you even tried ANYTHING for yourself? I've seen you begging for the last 3-4 weeks! I mean, 2-3 times daily, you ask for "the code" to something. Why not try it for yourself? Seriously, go try it.

This is VERY simple, if you can define a verb, then you can do it. You already posted most of the work.
In response to Ter13
Here's a hint: icon_state = "mob2"
In response to Garthor
this is the first code I have asked for today
In response to Codesterz
It's also something you could easily do if you passed 2nd grade.
In response to Garthor
I tried several times but each time it failed.
In response to Codesterz
Then go read the tutorials.
In response to Garthor
there's nothing in the tutorials about this...
In response to Codesterz
...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)
In response to Codesterz
In response to Codesterz
Try searching for smoething called a "verb."
In response to Ter13
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"
In response to Codesterz
Try actually calling the proc.
In response to Ter13
this was more of a wondering question than a give me question...
In response to Codesterz
that should work, oh, and put a usr. before icon and icon_state, just so there's no confusion.
In response to Ter13
I already did that nothing happened.
In response to Codesterz
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?
In response to Codesterz
YOu aren't calling the procedure.
In response to Ter13
what do you mean???
In response to Garthor
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
Page: 1 2