ID:2389131
 
Hi, I am doing the YourFirstWorld tutorial and trying to apply some features to a separate environment and everything went good except flick(). I think the search bar is broken, I cannot search in there.

I am using flick when bumping and when the mob is bumped.



Code:
This is called inside /mob/player/
Bump(atom/obstacle)
if(istype(obstacle,/mob/monster))
usr << "An enemy!"
else if ((istype(obstacle, /area/)) || (istype(obstacle,/turf/)))
usr << "Cannot go that way like this"
else
usr << "You just collided with a [obstacle]"
obstacle.Bumped(src)
flick("bump_1", src)



This is called inside /mob/monster
Bumped(atom/movable/bumper)
..() //it is empty
bumper << "[src] is really angry!!"
dir = get_dir(src, bumper)
flick("bumped_1", src) //


Problem description: What really happens:
When both mob and player are standing still and forcing collision(bumping), the method is called but the flick doesn't work.
But when they collide while walking towards each other in some ocasions, the flick works or works partially and stops.

Also, when I am furiously walking(bumping) to something, mob, turf or area, it doesn't change, until I walk in a different direct, outside the bumping zone, then it works where it should'nt.


It is worth mentioning that I have tried 25, 30, 40 and 60 fps. So I don't believe it is related to that. Also tried with different animation delays.

On the YourFirstWorld it works fine, and it is 25 fps.
Found the solution. It was due to my newbiesm.
If I wanted to animate a bump while still and while moving, I needed to have 2 versions of an icon_state for bump.
It looks like a turnaround pp2, but worked for this code.