So I’m trying to get a boolean from my character but it gives an error! Anyone knows how to fix that?
How can I get a variable from character to a state machine?
I am not entirely sure if that’s your problem but the “Cast to” node only works when a exec signal is connected to it’s input.
(Basically it needs a signal otherwise it just assumes it isn’t needed and will not do anything.)
I thought about that. But then how the heck um I supposed to get the variable?
You would do your casting in the Event Graph. Cast to your character from the “TryGetPawnOwner” in the Event Graph. Then you could your “Is Aiming” Bool and set to a new variable in the AnimGraph that can be referenced elsewhere. Here’s an example using “punching:”
Then you can get the anim graph bool in the state transition:
Let me know if this helps,
It worked, thank you so much!