Hello there!
I am working on a project in where a player is able to double jump. I have a jump counter keeping track of how many times a player presses the ‘jump’ button, which resets when the player touches the ground.
This all works great, but now I am trying to cast the ‘jump counter’ variable to my eventgraph for my animation blueprint, and it doesn’t appear to be casting.
The variable is an integer called ‘Jump Count’, and is attached to the thirdpersoncontroller blueprint.
Inside of my eventgraph for my animation blueprint, I have a ‘TryGetPawnActor’, and then cast to ‘ThirdPersonController’, to where I use the ‘Get Jump Counter’ node, followed by an ‘integer ==’ branch and a condition to see if jump counter is equal to 2. If it is, set the ‘Jump Twice’ bool (on the animation blueprint) to true so I can execute the transition.
If not, set it to false.
I attempted to throw in a print statement after the ‘get jump counter’ variable on the cast to the player controller, but it doesn’t print anything when I jump.
I have attached how I have my eventgraph on my animation blueprint setup.
I’m still somewhat new to blueprints and UE4, but trying to learn as I go, and cannot seem to get this to work.
Thanks for your help!