ID:175449
 
I wanted a mob, that when hit ran "XPMach1Hit" icon_state, i tried :

mob/verb/Attack(mob/M in oview(1)) //-Attack verb
set category = "Attack"
if(istype(M,/mob/XPMach1))
usr.XP += rand(2,5)
flick("XPMach1Hit",M)
sleep(70)

this didn't work, i tried:

mob/verb/Attack(mob/M in oview(1)) //-Attack verb
set category = "Attack"
if(istype(M,/mob/XPMach1))
usr.XP += rand(2,5)
flick("XPMach1Hit",src)
sleep(70)

but my character flicked intstead, wot do i do???
The first one is the one you want. Are you sure that the mob you're attacking has that icon state? If it doesn't, then that's your problem. =)

If you're confused about the difference between usr and src, see this article: http://www.byondscape.com/ascape.dmb/LummoxJR.2002-1104/