Greetings,
I’m making a prototype, and I would like to use tweens in it.
Here, I have the ball jiggling whenever it bumps into a wall, jiggling only a little bit when bumping slower, and very slightly jiggling when moving (The latter is very subtle and hard to see here)
It might not look to clear because of ShareX’s framerate, but there’s a minor issue…
The tweens conflict with each other.
When a tween triggers, another tween already in effect will likely prioritize, messing up the animations.
Also, for the tween that jiggles when you move, if you let go, it stays at it’s current size instead of reverting back to it’s original size.
I’m aware we have things like “Remove tween,” but if it’s meant to be spammed everywhere where tweens conflict, that seems a bit cumbersome to type AND read.
Here’s the code so far:
I plan to add more tweens later, so I want to get this taken care of now so it doesn’t become harder later on.
So, basically, is it possible to “crossfade” tweens in GDevelop? And if so, what’s the most proficient way to approach it?
Do I need to make a “tween state machine,” that only uses the tweens when a state variable is activated?
Do I need to make a function that tweens the ball back to it’s original size before starting the next tween?
Is there some way to remove tweens in bulk to make the code cleaner, or a way to prevent removing the same tweens over and over again?
I’m going to try out some of these things, but a step in the right direction would be appreciated if you can. Thanks