Multiple triggers, different events in one blueprint

Hello there, I’m using one blueprint and I have multiple trigger boxes in it and i’d like the triggers to fire different events based on which trigger box i’m currently overlapping with, is that even possible?

here’s the Blueprint

and I’m using this box which is parented to the camera in the player BP to trigger the events

Find the collision component you want specifically, select it, and in the details panel on the right scroll down to the bottom where you will be able to implement events specific to that component.

1 Like

you can simply achieve that by creating a condition, everytime you overlap with a trigger you set the condition to true and when you leave it, you set it to false, you do that with every collision box and you are good to go.

for example

I would not use bools for this unless you only have a very small amount of options.

You will have a large spaghetti of wires if you do all of the logic for this with only bools.

I’d suggest either having switches identifiable by an index, actually saving the current component as a variable (if the interact action key calls the component itself for the logic), or some other logic that uses a Switch on X node rather than bools/branches.

With Int id:

With Component Var and Interface:

With the second option each of your components will need to be a custom component you build that implements the interface you use to interact with it.

1 Like