How i set/get blueprint level reference?

i want call function in level blueprint.
Thanks

Hello @Malek8,

So there is a user in another [post][1] who had a similar situation to yours. I started to answer your question by looking at that problem’s solution.

So this is what I got:

Step 1: Create a Event in your Level blueprint and give it an appropriate name. To do this just left click anywhere on the event graph and type “create event”. This event is what you are going to use as your function, so place any code you want executed here. In my example I named it Write Message Event and made it call Print String to print a simple message to the screen.

50389-eventbp1.png

Step 2: In the actor Blueprint you are using create an Event Dispatcher and give it an appropriate name. You can create Event Dispatchers by clicking the “+” symbol next to the Event Dispatcher tab on the left side of the screen. I named mine in my example ActorEvent.

50391-eventbp2.png

Step 3: Bring a reference of your actor in the scene into your Level Blueprint. To do this just simply right click in the Event Graph of your Level Blueprint and choose your actor’s Blueprint. In my example, I called my actor Blueprint “CallingLevelBP”.

50393-eventbp3.png

Step 4: Drag off a pin from the actor reference you made in you Level Blueprint in Step 3 and type “Bind Event to (your event dispatcher name here)”. You will bind it to the Event Dispatcher you created in Step 2.

Step 5: You will want to add Event BeginPlay to your Level Blueprint. To do this right click anywhere in the EventGraph and type “Event BeginPlay”.

Step 6: In this step you will just be connecting up the wires in your Level Blueprint. You want to connect your BeginPlay node with your Bind Event node and your Bind Event node with your custom event.

50400-eventbp6.png

If you followed all the steps correctly your Level Blueprint should look like the one above. Now whenever you call the Event Dispatcher that you created in Step 2 in your actor Blueprint, the Event you created in your Level Blueprint should fire running any code that is connected to it.

I hope this answer helps you out,

Farshooter