Sword tapping crash

Started by Satoh, November 28, 2017, 11:59:02 PM

Previous topic - Next topic
I feel like I encountered this once before but I can't find a post about it and the bug tracker doesn't seem to mention it either...
I'm also not sure if I'm supposed to ask before posting to the bug tracker... so I'll explain it here and wait for advice.

If I define a sword_tapping animation that has fewer than 7 frames the game will either crash, or lock the hero into a tapping state, depending on loop flags.
(I did ensure that I had a tapping animation for both sword and hero.)

My animation only required 2 frames of animation (Link's Awakening style). If I set the animation to 2 frames, not looping, on the Sword, the game crashes stating that there is no animation for Sword's sword_tapping.

If I set the animation to loop, the Hero continually taps the sword without ever stopping.

If I stretch the animation to have 7 frames, everything works normally again. (Except I had to make a new texture for the animation because it didn't fit the other file anymore, but that's just an OCD thing.)
Patience is difficult and rarely thanked, but always appreciated, and sorely missed when absent.

This bug seems really weird. Does this happen if both the hero and sword have a tapping animation of 2 frames and same animation properties? Maybe this happens if the sword and the hero have different number of frames. I haven't tested this bug though. You should open an issue in the solarus repo: https://github.com/solarus-games/solarus
"If you make people think they're thinking, they'll love you. But if you really make them think, they'll hate you."

November 29, 2017, 01:05:00 AM #2 Last Edit: November 29, 2017, 01:13:41 AM by Satoh
Yes, if the sword and hero have the same animation properties and frame counts, the hero will become stuck in the tapping state.
If the sword is not set to loop, the game crashes because it can't find the sword sprite animation.
If the hero is not set to loop, he just sticks the sword out and never moves again.

I will open a bug report.

EDIT:
I have submitted it.
Patience is difficult and rarely thanked, but always appreciated, and sorely missed when absent.

I put a link to the issue that you've opened: https://github.com/solarus-games/solarus/issues/1117
"If you make people think they're thinking, they'll love you. But if you really make them think, they'll hate you."