Overlapping Trigger Boxes for ambiance sound triggering?

Kind of a weird request but I am trying to make trigger boxes for the areas in my game. How can I distinguish when a player is in a trigger box inside a trigger box? I have a custom BP trigger box. I have been stuck on this and have no idea how to approach it. Overlap events just do both at the same time since the trigger boxes are basically nested in each other.

Hey @NorwinLabs!

Are you doing this in the level blueprint?

Have you thought of using OnOverlap (big box) Set bool → True (in LBP),

Then OnOverlap (small box-separate actor) check if bool == True, and if ==True, play second sound?

I am doing this logic in the trigger box BP itself. How can I check that bool when it is the same class? Basically, there could be an infinite number of overlapped boxes. I want to use the one BP and be able to check against itself. I guess I just need to determine when the trigger box has a trigger box inside of it recursively. I just do not know how to do that effectively

I mean if it’s a BP it doesn’t necessarily have to have a trigger box as the BASE- which I highly recommend against in this case. I’d have two volumes as children of a scene node- that way it doesn’t have a hierarchy. Make sure they are siblings, NOT parented.

Then you should be able to do two separate events on start/end Overlap? It SHOULD work. I haven’t tried it myself- I usually just use the level blueprint as I’ve never needed anything like that more than once in a project, really.

I think I will take this approach. My scope has changed so I no longer need to create the trigger boxes procedurally anymore. Thanks!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.