I think theres a bug with this
-
Ive read in the article that animation priority is used in cases where other animations may conflict with another. This is exactly what i needed to happen but it doesnt. My character is already animating while he is flying upwards. As he collides with a powerup i have another animation set to take place. But the powerup animation never fully finishes as it is interrupted by the flying animation once the character presses the button to fly. So i set the animation priority of the powerup to even 100 and yet it will not prioritize. Bug?
-
This is getting frustrating. My only workaround right now is to disable each playing animation on the character just so the right one can play. Please add this to the list to fix for the upcoming update. Maybe im doing it wrong? Am i suppose to put a number for each play animation under where it say animation priority? Or isnt it suppose to work by simply putting a number like 5 on the animation where i want to prioritize?
-
@SplitMindGaming do you have
Skip If Animating
on for the animation of him flying upward?If your currently playing animation has that off then it will never listen to the priorities.
-
@Hamed yes I have tried many variations of this to work. I have an animation for the character flying, then when you release the button i have an animation for the character falling, then an animation when he picks up a powerup. I tried setting each one with the skip if animating on then choosing a number to prioritize which one should animate but its either going to continually play the flying animation or the falling animation. The only way for those 2 to work flawlessy is by not selecting either on those 2. Its only when i want the character to collide with the power up to prioritize the powerup animation but it gets cancelled out by either the flying or the falling. It would be much more simpler and make more sense if i could just set the powerup collide to like a 3 under animation priority that way it finishes off that animation before going back to its regular falling and flying animation.
-
@Hamed i will send you the updated game for you to see.
-
Do you have skip if animating off on your power up animation?
-
How I’d have it is skip if animating off on your flying and falling animations
Skip with animating off on your power up
BecUse your falling and flying are constantly triggering animations so it’s always going to try to interrupt
-
@Hamed yes i tried it that way also
-
Okay let me look at it
-
@Hamed i sent the files let me know if you receive it
-
@SplitMindGaming also that approach does work if you hit the power up and not touch anything. But player logic doesnt work that way as the user would be still touching the controls by insticnt. On the file i sent you turn off the skip if animating on the power up and release your fingers while colliding with it. You will notice that this works but next time hit the power up but at the same time press the screen. You will see that it cancels out the powerup animation.
-
So I've looked at your project in more detail. You need to have skip if animating on your power up. However! You also need to start your flying animation back up when its done. In your situation, easiest thing to do is just connect a flying animation to your power up animation, so that when its done, it will fly. And since you have a falling animation, you don't need to worry about the flying animation taking over.
To give you a sense of how animate behaviour works behind the scenes it does this:
- Is the currently running animation from the current behaviour? if yes don't do anything
- Is the current animation currently playing and skipIfAnimating is done? If yes, don't do anything.
- Should we not restore the original frame? Replace the object graphic with the last frame of the animation
- Is there an animation currently playing? Do we have a priority that is the same or higher than the current animation? Then play the new animation
- if there is no animation playing, play the new animation
-
@Hamed i see makes sense. What i did before you answered this was actually tied my animations with if statements. If flying play flying, if falling play falling, if powerup is enabled play powerup. This seems to work also.