#Help trying to implement an in between sprite animation
1 messages · Page 1 of 1 (latest)
Hello , DO you need help in creating
your current code right now is not very conducive of adding stuff like transitions. and it's very beginner basic and disorganized - the further you go down this line the more difficult it is to add additional sprites and actions
what you need is to reorganize all your code into a state machine
and then transitions are just a state, fall -> transition -> idle states
plenty of state machine tutorials on youtube.
ditto. you need state machines, right now your code is very 'hard to control' any bigger changes
like you have a long list of if statements etc. but like all of them gonna check each one every step if they're true and then run the one that is true, but then continue to checking the rest of them and run the following ones if they're true
which is gonna lead to an execution salad
if else chain would be better to stop checking for following statements that are at that point already irrelevant but state machine would be even better so you're not checking for things that are now irrelevant to your current state
I added them all to a state machine and it's working much better now!