Referencing a Variable from Box Collision in Widget Blueprint

Hey all,

I have set up a system where multiple actors will spawn then run to a location and be removed once they are at the location by a box collision (The code is below). I am still learning especially when it comes to widgets, but I am after the integer that is calculated in the box collision BP to be displayed on the HUD using the widget BP. Any help will be greatly appreciated. Thanks in advance, the community here has been really helpful in other posts I have read.

Hi,

the solution is really simple, in your " get text_0 " you juste have to use a " cast to " node and put the blueprint where the variable " lives " is held as the object of that node.

you will then have an " as -name of your bp- " dot in the right corner of the node, you can pull a blue line from here and connect it to the target entry ( on the node that makes an error on the second picture ).

and you should be good to go :slight_smile:

Thanks for getting back to me so quickly! Im confused about what I should connect to the object node to as the BP that I have called “BoxCol” I have casted too. The variable “lives” is contained within that “BoxCol” BP. This the error I’m getting. Sorry if this is another dumb question. Thanks again for your help.