How do I give animation blueprint extra information?

I am trying to have my character do an animation when it is mining or welding. I am using a state machine but I need to know when my character is mining or welding. I cannot seem to get information from my player controller because it comes up with errors.


How do I give this information to the animation blueprint?

That error message and errors on the nodes is a little confusing. The message suggests you are trying to assign variables that don’t exist in your animation blueprint; yet the nodes having errors suggest that it’s the character that doesn’t have them.

Could you double check both and show screenshots to confirm?

Never mind the errors. I tryed again and it seemed to work. But it doesn’t access the values. My real problem is that my character has a minning and welding animation state and I need to trigger that to play the animations. But I’m not sure how to give it that information needed to play the animations. So the real question is how do I get access to this information from the pawn owner providing that the pawn owner is the right kind of object(In this case a RobotCharater)?

What do you mean it doesn’t access the values? If the owning pawn is a RobotCharacter and those are public variables on that then that would be accessing those values.

Sorry for the late reply. But when I cast to my robot character using the owning pawn it is not able to access those values in the component that the robot character has attached. When I run in the editor it doesn’t work and says accessed none while trying to read the values of my component. The cast to robot character is failing and the owning pawn is the robot character. I don’t know whats going on.

What component? Could you show this robot character class?

Sorry but since yesterday UE5 has not been working correctly. It would freeze my whole computer every 10 minutes or so. Today it freezes my computer straight away and I have to force a shut down to get my computer working again. I think its some sort of bug so I will fix it and reply with more information on my question once I have got it working again.

Ok I got my computer sorted. For now at least.
Heres my component. Its very bare and only has two varables. Its used in my robot character. Thats it.


I have got my component to be read just fine by getting the player pawn and casting to the robot charater.

If I then try to use get pawn owner then it gives me errors.

Now heres the really weird thing. If I play the game in the editor like this.


My cast is successful because it doesn’t print fail.
But if I look at the blueprint while playing it fails constantly no matter if I’m getting the player pawn or trying to get pawn owner.

I am really confused as to why this is. My game works fine without trying to get pawn owner but if I wanted to add AI than it wouldn’t work(and thats something I want to play around with).

Why is the game acting the way it is and how do I get “try get pawn owner” to access the components values successfully?

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms