Hello, i followed a DevWorm tutorial about statemachine, and did exactly what he did, but when it came to test the animation "run", it did work as you can see on the video.
any idea about why it just spam the first frame out of 16?
#State Machine problem
1 messages · Page 1 of 1 (latest)
Have you tried adjusting the speed of the animation?
should be like this
Try slowing down the animation in the code. It wont be a good fix but maybe that is all that is nessecary
the speed of my animation isnt in the code how can i do it?
Not quite sure to be honest, although it should be pretty easy
I can check
animationPlayer.playback_speed = value
There we go
try that :)
damn thanks for your help!
where do i put it in my code?
Maybe first in the run func?
Value is what you change it to and try refering to your animatedSprite instead of animationplayer
So value could be for example 2
sadly nothing works
There is a posibility that you’re going from idle to run really quickly and that is causing your problem
Was thinking the same, can you show us the code of your state machine @lyric hemlock ?
Oh sorry it was in the first screens
Line 89, what exactly calls run_update ?
Correct me if I'm wrong, I've never seen a state machine built like this, but aren't you telling the run state to exit the moment it's updated? I don't see a direction == Vector2.ZERO check
This seems like it
I'm working on the state machine of my project rn and this one seems a bit compliated to use
oh yeah thanks got the problem resolved, it was switching between idle and run state, ty guys