Solarus-Games English Forum

Solarus => Bugs & Feature requests => Topic started by: Satoh on November 28, 2017, 11:59:02 PM

Title: Sword tapping crash
Post by: Satoh on November 28, 2017, 11:59:02 PM
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.)
Title: Re: Sword tapping crash
Post by: Diarandor on November 29, 2017, 12:57:33 AM
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
Title: Re: Sword tapping crash
Post by: Satoh on November 29, 2017, 01:05:00 AM
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.
Title: Re: Sword tapping crash
Post by: Diarandor on November 29, 2017, 02:09:48 AM
I put a link to the issue that you've opened: https://github.com/solarus-games/solarus/issues/1117