Shared boolean problem in level and hud bp

So I have been looking for this answer but can’t seem to find any answer that makes any sense to me.

To put it simply I want to set a Boolean to TRUE in the level blueprint after an event.
In my HUD blueprint a message should be drawn on screen once the Boolean is set to true

I have been looking at interfaces but I do not understand how to set these up, I have been experimenting with them for a day now and it feels like I am close but I just can’t hit the perfect spot. Most of the tutorials about BPI are directed at objects. But I don’t need objects, I just need a Boolean that goes from level to HUD blueprint.

Any help is appreciated

ML

Hi

So you just to pass Data from level BP to you HUD?

I’m not clear on whether a Boolean is called data but yeah I would like to pass data from my level bp to my HUD bp (and maybe back at a later point)

ML

Hi Macler,

If you create a boolean variable in your HUD blueprint and then click the eye icon beside it in the Variables tab, it’ll become public. This can allow you to access it in the Level Blueprint by casting to your HUD blueprint. To do this, go to the Level Blueprint and make the node “Cast To HUD_BP” (Where HUD_BP is the name of your HUD blueprint class). Then use the dropdown box to select your HUD_BP. From the ‘As HUD_BP’ pin, drag off and type ‘Set Boolean’ (Where Boolean is the name of your boolean variable).

This way you can set it in the Level Blueprint and use the result in your HUD blueprint.

Hope this helps!

d, 15 mins ago. :slight_smile:

Hi ,

First of all your answer helpt alot!
I begin to understand how this works. The variable is kept in the HUD_BP and can be “get” or “set” trough casting in any other blueprint.

However i needed to add a "Get player controller and “Get HUD” node to the cast “” for the network to work.

Thanks for the help!!