@reneb86 said in Animations in a state (QuickUltralite):
I want to create "states" for my character. States like "idle", "waving", "angry", "shouting", "talking", "walking", etc. Now the mechanisms for states are there, and even transition animations between states are there. But it seems to be impossible to create any kind of animation while the character stays within a state. I might want my "talking" state to be as long as 3 minutes, if that's how long the dialog is. But within those 3 minutes, there should be an animation looping. But states seem to always be entirely static.
I tried to define States within the top item of the character. I can define a lot of it. But I can't define the animation within the state it belongs in it seems. The animations types are not allowed to live in State or PropertyChanged.
Now. I may be able to solve this by defining states in every Image. But that is the wrong kind of encapsulation in my mind. The logic of waving animations, should be located in the same place, not spread across many different images. It can't seem to be done in QML though. Or am I missing something?
My inclination is to:
Define the animations outside of the states definitions, but adjacent in the QML file.
Use a PropertyChanges or StateChangeScript to set the Animation's state to running and adjust loops if appropriate.