How to create an overlap event on a pawn (actor) variable in the level blueprint?

Hi everybody,

In my level, I have variable which is an array of pawns (hence actors). Theses pawns consists of a few variables, functions, and a static mesh (a cube). This array helps me to create logic links between those pawns during the game (you can act on this pawn if the previous one in the array has such and such parameters).

The pawns are created and stored in the array in the level blueprint, following an event, and do not exist prior to the start of the game (event “press F” for now).

My goal is now to create an event “OnBeginOverlap” for one of those pawns. Usually, when the blueprint is in the level prior to the game start, you just have to right click on it in the editor, and use “Add Event”.

But here the actor is not created before the game starts : how can I dynamically create an event ? Should I use the “Create Event” node ?

Thank you for your help !

There is a bp node called Event Actor Begin Overlap you might want to begin there.

Hey, as previously, I have found my own answer, so let’s get it here… This video has the perfect example for what I want to do, using event dispatchers. It would have been hard to guess ^^

Just in case the video has been deleted when you reader are reading the answer (this kind of ■■■■ happens and that’s aweful I just hate it), attached are the printscreen of the solution, and below a short description of the video content. Go watch it, it’s way better.

What happens is basically :

  1. First you create your event dispatcher in the class you “listen to”

  2. In the level bluesprint screen, beginplay goes to this event dispatcher (you have to detail where it comes from)

  3. Nothing happens until a call to “myEventDispatch” happens (in the video it’s pressing the key V)

  4. If the player presses V, the character blueprint sends the call

  5. In the level blueprint, the bind goes kind of backward to the event “myCustomFuction” (custom event)

  6. This then goes to the string printing

Good luck everybody :smiley:

Detailed answer here : Event Dispatchers explained - Finally! - Blueprint - Epic Developer Community Forums!