[4.5.9] End Animation not working with 8 frame animations... fix

dale_coop

Moderator
Staff member
I couldn't find any fix for that issue on the forum, so I decided to write a new one. Please let me know if it's been already available on the forum, I will remove my topic.


THE ISSUE
If you have an 8 frame animation, then your "End Animation" action is never executed... and the animation just loops.

2022-02-08 17_04_22-Monster Animation Info.png


THE FIX
Modify the doUpdateSpriteTimer.asm script:

2022-02-08 15_57_45-Project Settings.png

And line 19, replace the lines:
Code:
                CMP animationFrameHolder
                BNE notAtMaxAnimFrame
                    ;; is at max anim frame, so set anim to 00.

With:
Code:
                BEQ atMaxAnimFrame    ;; dale_coop: fix the end animation with 8 frames
                CMP animationFrameHolder
                BNE notAtMaxAnimFrame
                    atMaxAnimFrame:    ;; dale_coop: fix the end animation with 8 frames
                    ;; is at max anim frame, so set anim to 00.


It should look like this:

2022-02-08 16_08_51-● doUpdateSpriteTimer.asm - BASE_4_5 - Visual Studio Code.png

Voilà !
Now the 8 frame animations should have their End Animation work.
 

Bucket Mouse

Active member
Ah, thank you!

There's another bug where if you have the sprite move on the eighth action step, it will move much faster than normal. Is there a fix for this?
 
Top Bottom