I have a way around this issue.
How I jump:
http://puu.sh/hhseL/98a442b7e9.png
I use the premade function within the game.
How I set the Boolean variables:
http://puu.sh/hhsda/06097ac06b.png
For falling, I just use a premade function (again). It checks that, and it’s all good. But for jumping, I get my velocity, break it up into the Z vector, and compare that with 0.
How I set the flipbooks:
http://puu.sh/hhso6/dc4fbf5326.png
Pay attention to the order. If I didn’t have my jumping system setup, then “Falling” would be checked as “True” if I’m moving up or down because of the function I used to set the falling variable. To combat this, I have it setup to check if I’m jumping first. If my Z velocity isn’t positive, then it’ll check out as “false”, and it’ll set me to the falling animation (if I’m moving in the Z axis). The system essentially overwrites the check for falling to check if I’m moving up first, and if I’m not, then I’m moving down and it’ll set a falling animation.
I hope this helps.
PS: After review, I could probably redo the “Check if I’m falling” system by doing the same thing I did with jumping, but have the “greater than” float be replaced with a “lesser than” float (with the value still being 0). Although it’s possible that there would be an issue where if my Z velocity hits 0 right before I start falling, then I’d hit the idle (or run, but I’m not sure) animation before it got set to the falling animation. But what I have works fine, so I’ll probably just leave it as is until I need to do otherwise.
EDIT: Also, my animation state machine is created using an enumerator in conjunction with a function (no rhyme intended). So when you look at my “Animation State Machine” function, the “Animation State” setter that follows after the branches within it is an enumerator.