Paper2D Animation State Machine Help

I need a little help with the animation state machine. If you look on episode 8 of the Paper2D tutorial, there is an animation state machine that they set up. I created a punching animation and added it to the graph, but how would you “trigger” the Punching boolean? I can’t get it to activate.

Assuming you have an input action set up, once you press the corresponding button the event fires. When that happens you set your punching boolean variable to true. At the same time your movement animation/jump would go through a branch to check if the punching boolean is true or false. If it is true, it would cease to proceed through the animation state machine. Now back at your input action event, after setting the punching boolean to true, you would set your animation flipbook to punching or whatever you called it and then play flipbook from the start, Once the animation is finished (you can get the time of the flipbook after setting it and have a sequence flow node that has a delay that has the flipbook time plugged into it so that it fires at the appropriate time) set the punching boolean back to false which will ensue the animation state machine to proceed with the default is moving or is falling statements and play the flipbooks accordingly.

I made a comment instead of an answer for this as I do not have enough information from your graph to know exactly how to best answer in your situation. But hopefully this will help.

See, triggering the variable was the only part I had trouble with. Would it look like this?

130687-trigrd.jpg

Also, how should I hook it up to the rest of the blueprints?

Hey, it’s been over five days. Can you still help me?