How can get acces to actor boolean from character BP

I have this actor called BuildSpace, and on it i made a boolean variable.

And when the boolean is active or deactive do something on PixelboyCharacter1

but i dont know how to make it work, if someone know how, explain me please…

Thanks for reading.

you need to get a reference to the buildspace actor to get the variable from it. there is a bunch of ways to do get a reference.which include variables, traces, and more

but i already try it and nothing works…, between input R event and branch was cast buildspace actor, i connected the get boolean on it and try it but dont work, can u show me how can i do it succesfully in an example?

https://docs.unrealengine.com/en-US/Gameplay/HowTo/ReferenceAssets/Blueprints

So, you have BuildSpace actor and PixelBoyCharacter. You have a boolean variable in BuildSpace, and you need to access it from PixelBoy, right? If that’s so, you need to make your variable public and get a reference to you BuildSpace object first, cast it, and take that variable.

without knowing what your looking to achieve it makes things a bit difficult to say for sure, i dont know the mechanics of your game or what your script is meant to do. i assume that you are spawning a actor while you are within the collision volume and that you want something to happen when you press the R key. i aslo am going to assume that the player will only overlap one buildspace at a time. give me more information and i will provided a better answer.

one way you could accomplish things is: when the player overlaps the buildspace you can get the player character and set a variable in the character directly as shown in the picture below. with this method you could also set a variable that is of the actor type to use as a reference.

another method would be use the get overlapping actors node when the R key is pressed. you will need to set the filter for the class you want in this case. this method is also not the most efficient since it will return an array and you will need to filter out anything not needed (you shouldnt have a issue though if you only overlap one buildspace and have the filter set).