animations inside my StateMachine can only triggered/rendered once
I have a StateMachine with several animations linked with my Inputs. From Any state it I set the Trigger to render the animations. Then the animation will run and it will go to Exit (check the image attached) But for some odd reason only one animation can be triggered with my Inputs and StateMachine. If I try to t rigger another animation it won't get triggered/rendered in the Rive editor or in my client Flutter app Any advice will appreciated
attached is the state machine
According to the docs: "The Exit State tells the State Machine layer to stop playing. This niche state has uses when multiple layers are being used."
This is the intended behavior when going to the exit state. If you want to be able to go back to an animation at any time, simply delete your transitions to the exit state and the inputs should be able to trigger again.
Thanks. the issue still persists when i remove the transition to Exit State. Seems like my problem is with the animation. Every time after i trigger one animation and try to trigger another the 2nd animation won't trigger
is it possible to share the rive file? It's hard to know what's going on with just the picture. What are the conditions of the transitions? Are they Booleans, or numerical, or triggers? Is it possible both are true at once?
Yes. i can share the Rive file with you. So our designer created separated animations for me. I added them in the state machine and created 3 different input triggers to fire them. But as I show you in the picture only the first animation will get rendered/triggered. If i fire the trigger again or re-trigger the first animation nothing shows up
Riv files can't be opened in rive. You have to export a rev file instead.
However, I was able to reproduce it on my end using your example:
In this case, some of the animations were left because the value wasn't being reset in the other animations. For example, Timeline 1 sets X, Timeline 2 sets Y. If I trigger timeline 1 again, nothing happens because the x position is already set.
To fix this, I set all the relevant properties in the keyframes. In this example, X and Y so that the values would be overwritten when it got triggered.
I'm not sure if this is your issue, but this is likely the issue.
Another solution would be to set up your State machine to go back to some neutral state that all animations should take off from to ensure objects are where they started at. with the keyframes at default values.
Then make sure you have a returning transition when the animation finishes. If you are still stuck try sharing the .REV file so I can see what your dealing with.
if you open in Rive editor and go to the Transitions Playground you will see. My goal is to by Entry we show the idle (empty screen) animation. Then in Any State I can trigger any animations I want. I created 2 just for now.
As you can see. when I trigger them none of these 2 animations showed up
I'm not sure if I understood what you were going for, but here's an edit that makes the animations work:
In addition, the opacity for the animation groups were set to 0 in the idle timeframe but not set back to 100% in the animation so they were never visible.
If you only want one of your groups to be visible at a time, you could consider switching to using a Solo so you can toggle your views more easily.
I've attached my updates. I hope that helps: