Detecting overlap event in a grandchild BP actor

Hello,

I’m hoping some more experienced Blueprint coders can offer me some guidance on this problem.

I have a level map containing procedural puzzle Blueprint actor which contains another Blueprint actor. I need to dispatch overlap events from a simple cylinder mesh inside the inner most BP actor and use them all the way back in the the parent level map.

Structure is: Map > Main BP > Child BP > Cylinder Mesh

In the Map i need to have an event fire when the Cylinder Mesh is overlapped by the player pawn.

I’ve been trying to make this work using dispatchers, but I keep running into confusion with targets / scope.
The reason the Cylinder mesh lives inside a Child BP is that it is moved around with other objects as part of the procedural generation of the puzzle in the Main BP.

Here’s a visual representation.

I hope I have explained well enough. How would you go about this?

By “map” do you mean “level BP”?? If yes, then all you need is to select the “cylinder mesh” and right click in the level BP to open up the search bar and you should see “create reference to selected actor” once you have a reference you can say “on event overlap” and then script whatever logic you want from there.

Then create a reference to the “grandparent” and when it creates the child store a reference to the child and when the child spawns the grandchild create a reference to the grandchild. This way you can get a reference through the grandparent which you said is placed in the level. It’s a long process but can be done through the level BP still.

Hi, thanks for your answer. That is how I would normally proceed, however in this case the cylinder is not placed directly in the level. It is dynamically spawned as a component inside a blueprint actor, from within a parent blueprint actor which is in turn placed directly on the map. As such I am unable to create a reference to the cylinder because I can only click on the grandparent BP actor.

so hierarchically it looks like this:
Level BP

  • BP Actor 1
    • BP Actor 2 (dynamically spawned within BP Actor 1)
      • cylinder mesh (a component of BP Actor 2) for overlap trigger

I got this sorted out. Your advice helped me a lot. I was really struggling to nut out dispatchers and hierarchy. Setting a reference to the BP Actors when they are spawned was part A of my solution and then using event dispatchers correctly (which I wasn’t) was part B.

Thank you.