How to catch reference to scene object variable in blueprint

Hello all,

I have created a scene and I would like for a few objects to flicker in and out. It seems my failure is in getting a working reference to a scene object and its variable.

I have 2 actors in the scene that were created by selecting various sets of items and clicking “blueprints->convert selected components to blueprint class”. Each one of these have been modified to have a boolean, “isRuinEnabled”.

I have created another blueprint in the scene called “doUndo” responsible for checking the “isRuinEnabled” boolean in each from the blueprints mentioned earlier, however, any attempts to reference them results in the following error,

Error Accessed None ‘ancient_ruins_ref’ from node Branch in graph ‘EventGraph’ in blueprint doUndo

I modified the blueprints to simply test the status of a boolean in one of the items specifically. I attempted to make it clear in the photos below. Any assistance would be greatly appreciated :slight_smile:

Hi man ,
i watch the screenshot and i dont see if you have filled the variable Ancient Ruin Ref.

So first thing to do is , set as editable your Ancient Ruin Ref… then compile.
Now in the main view selecting the Do actor, you should see in his detail panel the Ancient Ruin Ref.and his empty menu.
from that menu you can select any actor that already exist in your scene.

By the way , accessing variable on other blueprint can be messyful , so i suggest you to just call custom event.to make changes in their own Actors.
So , for safety , try to add a Custom event in your other blueprint, something like “Sayhello” with a print hello .
And try to access your Ancient Ruin Ref. and call that event. if you can see the hello on the screen .
mean that the variables are wrong but the address is right.
just to know where to focus.

Thank you, Est_engine. You were correct and I had made too many assumptions about the reference I was dragging into the blueprint. With a bit of casting I am able to successfully access the custom even in each blueprint. Also, from what I can see now, I was trying to access a reference to the actual blueprint asset and not the instance in the scene. I may not be 100% correct on how I am accessing it, but a functioning blueprint is a good start.