You have 2 choices, Bluprint Comms or Blueprint Interfaces. Basically, make the variable public, ie. click the eye next to it so it’s open. But here’s a thread with discussion on it:
Hi. I have a blueprint character and I have set up a bool to be activated when the event “InputAction Jump” fires. I want that another blueprint checks that bool, but I can’t find the way to access it there. It would be great if there was a way to call, in that other blueprint, “Get Player Character” and from the return node be able to call a function to get the bool variable value, but I’ve only been able to do that with variables that are actor references (with “Exposed On Spawn” and “Editable” set to true), but not other types of variables. How can I do it?
Thanks you. I recommend looking here to people searching on this: https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/BlueprintComms/index.html
I have to say whats on everyone’s mind here. I’ve read this and other forums repeatedly to figure this out and still don’t get it. In other games or scripting in general it aint no thang to declar variables in higher scope and access or change said variables from any scripts within the scope. Or declaring variables, declaring global variables is a synch in other engines. I don’t understand at all why this is so extremely hard to do in Unreal. I really don’t. I spent the last 3 hours messing with interfaces and functions all so I can pass variables from a parent class to its child class and still no luck. It almost seems as if ya’ll have made this difficult on purpose. Whats the deal?
This is how I feel. 3 days now, reading about interfaces, public variables, dispatchers, blah blah blah. read so much I can barely even process the english language anymore and I still have no idea how to call a variable from another BP. At least I finally read somewhere that you just flat out can’t call variables from level blueprints (okay, sure, why not.). I’m totally burnt out trying to solve something that is so simple. most likely the solution is a checkbox in some super unintuitive menu waiting to be ticked. Hopefully someone links me their tutorial video that’s over an hour long with some overly complex reply that I can’t begin to decipher.
You can also call blueprint variables from another blueprint by using a way that I only just realised, although I can’t believe I didn’t. when you need to access the variable, simply put “Cast To [BluePrint Name]”, and drag out the "As [BluePrint Name Casting - Child Parent] node and type the name of the variable. This will allow you to affect and search for the other BluePrints’ variable. If my description wasn’t clear, I have included the link to a tutorial on this subject.
This thread is over 4 years old…
Yeah, but I find that way easier, and if others come to this thread as I did they’ll have that option as well.
its looking to be helping me.
Yeah it helped me too , don’t think other people aren’t learning now what you did 4 years ago .
But, what do I put into the object node? Neither “get owner” nor “get parent actor” works
Me too having same question since a long time. That’s why I always try to avoid casting