Toggle visibility of all actors within a trigger volume / world area

How do I trigger visibility of all actors within a specific world area when entering that area?

I want everything in the trigger area to be visible and everything outside of it to be invisible.

My world is made entirely of 1x1x1 blocks which are set up as blueprints, so I could add a variable to them to identify them.

What I can’t do is get to that variable from the trigger volume blueprint.

i.e. if all blocks are labeled with a string variable of “A1”, how do I get all actors of type that have that label? It would need to be different to those blocks labeled " A2, A3 etc"

It’s probably something to do with arrays but I can’t quite get there.

I can’t cast to an actor from the trigger volume blueprint, because there are usually a minimum of 64 actors in each area, all copies of the same blueprint.

Hi!

To do this, you can use Blueprint Interface. And you can use any number of blocks and actors.

This is basic example how it works.

Create Blueprint Interface and add funstions

Create blueprint Actor class for Trigger. And add Scene component fo Root and Box Collision component for trigger volume

Open Trigger BP and your Actor BP and add blurptint interface

Open Event Graph and add Overlap events and interface function

Open your actor or actors blue print and add events from blueprint interface

And result

61008-vis.gif

Thanks very much for this, I’m going to try it out when I next get a chance and report back.

I’ve found another way to do this using an array. Check collision with the trigger volume, look for the level number variable of actors within its boundaries, check against level number of trigger box, set visibility accordingly.

No blueprints interface required.

Here’s a photo, can’t upload it here on a phone.