How to pass bool from actor BP to another

Hi, bit of a noob question but I’m trying to pass a bool variable from one blueprint to another blueprint and I’m not sure how. The first blueprint is a wall that detects when it is hit by a projectile and if it is hit then it sets the bool to true. The second blueprint generates a portal from the projectile. I want to add walls in like portal so the portal can’t be placed on some walls.

The problem I’m having is passing the bool from the first blueprint to the second blueprint.

This blueprint detects if the wall is hit by the projectile.

I want to add the bool in to the branch so if bool is = to true then it doesn’t generate a portal. How would I go about doing this?

When it come about sharing some variable through blueprint, the easiest way to make it work is with casting.
Here the general step->

-inside your wall blueprint, you take the actor of the event hit and cast to (your blueprint)
(if the cast fail that mean it’s not the correct actor for this bp)

-inside your blueprint make a function or an event to receive boolean value and do the rest of your logic with this

-then in your wall blueprint again, use the output object to get the function/custom event that you created

This is basically how you will use the concept of sharing variable (int, string, float, bool, etc) through BP

Blueprint Communications | Live Training | Unreal Engine - YouTube - great stream about Blueprint communication!

Thank you for replying, I managed to get it working but it was taking the location from the last hit to check if it had hit the wall so the portal would spawn for the first hit. Managed to work around it by destroying the portal if it had hit the wall.