Endless runner: Why state machine bypass Spawn animation state and go instant to Run animation state?

Hello !
I am developing an endless runner and I use EVENT TICK in BP_MainCharacter to trigger endless run.
What is the correct way for the game to start with SPAWN animation state and then continue with RUN animation state?

I am asking because now it happens to me that the game starts right away with the RUN animation state.

Or it happens to me that the SPAWN animation state is activated and as it completes the vector continues to move the character forward without activating the RUN animation state.

Where am I going wrong? Do you have any suggestions?
Thank you for your time



For animations that are outside the locomotions like in your case, I recommend using anim montages because it would be unnecessary to have it as a state in your anim blueprint if it’s already gonna be played only once.

To turn an existing animation into a montage, you should right click on your asset in the content browser, navigate to the “Create” option and select the “Create Anim Montage” button. Then, navigate to your anim blueprint’s main anim graph, the one you can access by clicking on the “Anim Graph” text on top of the screen and below the tabs, and not the other graphs inside your locomotions. Right click on an open space, search for “Default” and get the default slot of your character. It should be a grey node. Then plug it’s both input and output execution pins accordingly. This was a necessary step in order to make the anim montages work.

To play the anim montage, navigate to your character blueprint’s event graph and get a “Play Montage” node. Select an anim montage to play from the dropdown menu inside the node and plug the node to the Event Begin Play node.

And finally, to make the character start running after the animation is complete, you can simply create a bool type variable and set it to true after the “On Completed” pin of the Play Montage node, and bind the condition to allow running only if that variable is true by using a branch node.

Hope this helps! :blush: