Getting event in pawn over to levelblueprint

I’m trying to get an event in my player pawn to do something in my level blueprint.
Basicaly i have a onActorOverlap in my pawn which does some stuff, and i want it to do some things in the level blueprint as wel. Does anybody know how to set this up? I tried the available tutorials on blueprint communications but i can’t seem to get it working.

Thanks!

There was a question already about this one, cheers! :slight_smile:

Hi Derzo,

I think i tried all methods of communication, but none of them work so far.
Could you describe the method you would use to get an overlap event in the player pawn to play an animation in either the level BP or another class BP? It almost seems to me like the pawn BP can’t communicate at all at this point.

What you could do is have a reference in level blueprint of the animation you would play and on beginplay, you cast to your player pawn and promote the reference to variable inside the player pawn. Then in player pawn on overlap, you get the variable and play it

Solution:

I got it working by using event dispatchers.
I made an event dispatcher in my player pawn, which i then call in the pawn BP when i want my animation to play.
For my animated skeletal mesh i made a custom class BP (see image below), in which the the event needs to be bound to the dispatcher. The result is that the play rate in the class BP is set everytime the eventdispatcher is called in my Pawn BP.

Thanks for your answers Derzo, i have found a sulution through you previous comment. It seems that i didn’t use the cast correctly.

That’s great!