ID:147900
 
on my verb, my icon doesnt flick. the icons state is named correctly from the usr icon and this code. it should flick to "PunchKick", "Kick", or "Punch" is there something wrong with this code?



if(usr.dir == 4)
var/RANDOM = rand(1,100)
if(RANDOM == 1)
flick("TBHit",src)
flick("Punch", usr)
usr.PSTR += rand(1, 2)
usr.MPL += rand(1,5)
if(RANDOM == 2)
flick("TBHit",src)
flick("Kick", usr)
usr.KSTR += rand(1, 2)
usr.MPL += rand(1,5)
if(RANDOM == 3)
flick("TBHit",src)
flick("PunchKick", usr)
usr.PSTR += rand(1,2)
usr.KSTR += rand(1,2)
usr.MPL += rand(5,10)
else
flick("TBHit",src)
flick("PunckKick", usr)
usr.MPL += rand(5,10)
First, check to make sure that section of code is calling with the player's mob as the src. Second, make sure your icon states that you are flicking are animated and longer than one frame; if they are shorter then it will flick but so fast that you might not notice it. Third, check to make sure you don't have any other icon states with the same name to interfere.

If none of the above work, then the only other thing I can think of is that the icon state you want to flick to is in a different dmi file.
In response to Loduwijk
That code only executes if the mob is facing east. (4) Make sure of that.