Author Topic: Sword tapping crash  (Read 70 times)

Satoh

  • Newbie
  • *
  • Posts: 45
    • View Profile
Sword tapping crash
« 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.)

Diarandor

  • Hero Member
  • *****
  • Posts: 805
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: Sword tapping crash
« Reply #1 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

Satoh

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Sword tapping crash
« Reply #2 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.
« Last Edit: November 29, 2017, 01:13:41 am by Satoh »

Diarandor

  • Hero Member
  • *****
  • Posts: 805
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: Sword tapping crash
« Reply #3 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