I’m trying to make a minigame where the animation 1 plays while airborne, so I put an OR block that checks for jumping or falling, but without the trigger once it gets stuck in the first frame and without it it plays for 1 frame and goes back to animation 0.
I’m guessing it’s the button behaviour on your player which could be changing the animation. And then when you get to the events in screen shot, the animation is changed again to a different one, which causes it to start with the first frame.
Also, instead of using the OR and Trigger Once conditions, you could invert the condition “YouXNA is on floor”.
I tried using the inverted is on floor and it had the same problem. Without a trigger once it seems to constantly start the animation while in the air, and with it it goes back to the grounded animation after one frame. What’s also confusing is that the grounded animation works basically the same way and yet it still plays fine.
In case it helps, here’s what the animation sheet looks like.
…why not just use “is not on floor”
is there any other event in your sheet (that is not in your ss) about animations?
yes, but the animation 1 (the one that should be playing when airborne) works fine the first time its played
also, the gravity is 0 by default before changing to 1000 so that it doesn’t interrupt the existing “fake” fall at the beginning, done by the vertical tween
Get rid of the button behaviour. It’s not the correct behaviour to attach to a platformer character.
When the tween is finished, the condition remains active until it is deleted.
it works the first time bcs you’re in the middle of the timed event
To elaborate on @RMDB’s point, in the event where you check fall tween has finished playing, add the action to delete the tween from the YouXNA object. Otherwise the condition will be true and the animation will constantly set to 0.
I couldn’t find a “delete tween” action, but a trigger once while true had the same effect and it works properly now.
It’s labelled “Remove a tween”. Click on Add action in the event, click YouXNA (since it’s being removed from the object) and you should have these options at the top of the actions list:
It’s true;
however, for the future I suggest you to keep in mind that if you use a Finite State Machine, that tween finished with the trigger once condition could become true again when swapping states, and therefore reoccur…
possibly when you wouldn’t want it to.
But for now, I don’t think it matters…it was just to clarify…
to sum up…if you don’t need a tween once it’s finished, it’s good practice to delete it.





