What object do I cast to change a variable in another blueprint?

This is probably a very basic question but I am having some difficulty. I have read through the tutorials available at Casting Quick Start Guide | Unreal Engine Documentation but these tutorials never really go into much depth about choosing which object you cast and why.

How can I modify the variable jog toggle, which is contained within the animationblueprint, following a click on a button in my UI blueprint? I have set up the UI blueprint as follows, but it is not clear to me which object I should be casting. Can anyone advise me?

First you need to cast to the BP that has a mesh using that anim BP. Then get that skeletal mesh from that cast and then get(or cast to again i think) to the anim BP of the skeletal mesh. Or you can just use a Blueprint Interface really.

I see. I had planned to use the animation blueprint on several different meshes for different characters, so thats why I tried to cast straight to the animation blueprint. I will look into the interface, its seems like the sensible way to go. Thanks again for helping me

Although the more I think about it, perhaps that implementation is not good for a multiplayer game. Might it mean that if one player toggles jog, and adjusts the animation blueprint that all players will be toggled jog?

I dont know all the ins and outs of networking but i would think it would affect only the player’s anim BP. Have you given it a try yet?

Hi Jacky, I was able to get it to work by moving the variables into the character blueprint as you suggested. I have not set up multiplayer yet, I shall find out in the future how it will work!