Animations are randomly skipping frames, changing speed, or starting at different frames

D

Drflanigan

Guest
Hello.

I am using the drag and drop style programming and I am having some trouble.

I made an animation of a claw, in an idle pose where the fingers are just slightly moving. The claw object has a step event that sets the x and y positions to where the mouse is. This part works fine.

I have another animation where the claw "scratches", and this happens when the mouse is clicked.

I have a "global mouse left pressed" event in the idle object, that changes the idle object into the "scratch" object holding the animation.

Inside the "scratch" object, there is a "when animation ends" event that changes the "scratch" object back into the "idle" object.

This all works. When I launch the game, the idle animation object follows the mouse, and when I click, it changes to the scratch animation object, and back into the idle when finished.

The problem is, every time the scratch animation object plays, it is very erratic.

Sometimes it plays perfectly. Sometimes it skips the first two frames of the animation, sometimes it plays much faster than it should, sometimes it plays much slower than it should.

Am I doing something wrong?
 
D

Drflanigan

Guest
AND now my sprites are randomly changing size as well. What the heck is going on?

They are all the same size relative to eachother in the file I have, but when I import the images for the animations, the slash is skinnier than the idle claw for some reason
 

gnysek

Member
You need to change not only sprite, but also set image frame to 0, otherwise it will continue from previous sprite frame number (and if new one have less, it will finish ASAP).
 
Top