Animation Timing

Superior Games

  • Posts: 6
Hello all. My game is a platformer and the main character has a shooting function. That all runs fine, but I want to have an animation for when he shoots. Now I've already got the animation created and I tried putting it in the shooting code as a "switch animation to".  But I cant see the animation.  What I believe is happening is that the animation is happening, just so quick and getting cancelled out by further inputs while moving. Like if I keep the "move right" button down it is going to show me the move right animation. But if during this, I press shoot, it gets cancelled out so fast, by the "move right" animation, that its not visible. Any help is appreciated! Or if you can correct my theory of what is wrong that would be awesome! Thanks!!

Luyren

  • *
  • Posts: 2802
Your theory is correct. You have to take that into account when switching animations, either by disabling other behaviors during the attack, or blocking the animation code of other behaviors from executing during the attack. If you are using the jump and run kit you can download from the help section (I think), if I'm not mistaken it has a feature to set the priority of animations to cover that kind of situation.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

Superior Games

  • Posts: 6
Thanks again Luyren!