When I had it set up this way, it worked but the thing is, as every transition rule would check for this bool, the animation state machine would jump from first to last stage instantly, so I figured I need an int to check instead.
The concept is pretty simple, every time the player presses space bar, the animation state event graph increases the int by 1, and every Transition Rule checks for a specific value, the first transition happens if int == 1, second if int ==2, and so on. But I’m not really sure how to do that, I’m have some experience with programming in general, but i’m new to UE Blueprints.
This is what I tried, and it didn’t work obviously:
You are not connecting input pins, that’s why it doesn’t work. If you see this symbol and it’s not connected to anything that part of code won’t be executed.
My suggestion is to use an enumeration instead of an integer to make it more “human friendly”:
Thank you Ares, I set up the enum as you suggested, but I couldn’t compare the enum inside the Transition Rule as you said, I probably did something wrong, how would I set the Transition Rule up? Thanks again
I’m not at home right now so I can’t check it, try dragging from the enum value and type = and see if there’s nothing similar… In case there isn’t I’ll check asap
I’m not sure what you mean by ‘dragging from the enum value type’, the enum variable was created inside the player controller blueprint, and not the NPC that should play the animation therefore where the Transition Rule happens. And when I try to drag the Enumeration blueprint inside the Transition Rule, or even the Event Graph, it says: Cannot create components from assets in a non-Actor blueprint.
Obviously you should pass that value to the animBP (In the eventgraph of the animBP you can use GetPlayerController, cast it to your controller class and save it in a variable, you should be able to access it then)