ID:271652
 
Hello Well i'm coding here and i want the icon to punch when it attacks and it does but once i click attack it goes into the icon state and does not come out. Can someone please tell me how to make is so every time i click Attack it changes state to 'punch' just one time to make it look like the icon is attacking. Then switches back to the base form of the icon.

mob/Shinigami
verb
Attack(mob/M as mob in get_step(src,src.dir))
set category = "Combat"
src.icon = 'MYICON.dmi'
src.icon_state = "punch"


if(usr.swordpower < M.def)
src<<"<font Combat Info: You hit [M] for 1 damage!"
M<<"<font Combat Info:[usr] hit's You for 1 Damage!"
M:HP -= 1
M:DeathCheck()
return
if(M.z == 8)
src<<"They are in a Safe Zone."
return
else
//shini flick

var/damage = usr.swordpower - M.def


usr << " Combat Info: You hit [M] for [damage] damage!"

M<<" Combat Info: [src] hit's you for [damage] damage!"
M:HP -= damage
M:DeathCheck()
usr.exp+=rand(50,300)
usr.gold+=rand(10,20)
usr.Levelup()


Sorry i don't know how to post the actual code box. Also sorry that it is all in bad indentation but that's how it is when it's copied and pasted.

First of all. Is this ripped?
In response to DadGun
No it's not, it's a game im working on with a team.
It is not a rip from another game.
bump ^^ please help