Overlapping the Trigger of a Blueprint enables Trigger of another Blueprint

Hey Guys :smiley: as you can see in the image I have a simple switch toggling blueprint. But I want the player to overlap a TriggerBox of another Blueprint named “BP_LockedDoorInteraction” to enable the trigger of this blueprint which is toggling the Lamp switch, named “BP_Lamp”. I believe I must add a custom event for the lamp and get the reference in the LockedDoorInteraction blueprint. But I’m quite new with custom events.

Hey @Benyamin3000. What you need to do is to add an AActor Type variable in your BP_LockedDoorInteraction blueprint and set that as editable by toggling the “eye” button to the right of the variable name inside your blueprint. That way you can set the reference to your BP_Lamp actor in the world.

To create your custom event, you simply right click on the EventGraph and type “custom”, there you get the option to create your event by “Add custom event”. Inside the event you add whatever code you want to execute. After that, you can right click on the event graph and the event you just created should be available to call, just as any other node.

So, what you want to do is, inside the BP_LockedDoorInteraction, in the BeginOverlap event you call the CustomEvent from your BP_Lamp by using the reference you saved as a variable.

In this image, I use a variable that I called TriggerToEnable, that is a reference to the other actor, BP_Lamp in your case. You can see that in the Overlap Event I cast the reference to its class and then call the custom event that I called “Enable”

Remember to set the reference to your other actor in the Details panel in the world view. In this image I set the reference to an actor named BP_LockedDoorInteraction2, in your case it should be BP_Lamp

Hope this helps

1 Like

Oh I did it! thank you so much for the help! It works now as I wanted, Trigger now must be first overlapped to let Player toggle the Lamp Switch.

1 Like