Download

Destroy trigger after event? ( IMPOSSIBLE??)

Hello guys i need to destroy my trigger after the event:
af3f76b4fee3e3d64bd0fac6c249a5b4b6606141.jpeg
How i can do that?

You can use the destroy actor node.
Just create a link between the Overlapped Actor from the OnBegin Overlap , and the target pin from the Destroy Actor. This will destroy the trigger box

I don’t know exactly what you are looking for, It looks like you are in a level blueprint however this method can be done in a player blueprint as well or inside the actor. Mine is inside the level blueprint. One method I use is if you want to disable/re-enable a TriggerBOX or any type of trigger what I would do is just
Try setting its collision to disabled instead of destroying the trigger. this way you can re-enable it again in a different event etc.

In the image you will see 2 custom events. 1 to enable the trigger box
1 to disable it. as long as you run your code before the set actor enable collision it should work great.
You can remove the print strings. this is just for debugging to see that something is happening.
also you can remove the set actor hidden ingame BUT i added them to show you that you can hide the whole actor using this node so the visual representation of the actor can be hidden from being seen.
it can then later be used for a whole new event that when it is re-enabled maybe you can have another branch that makes the trigger to have another purpose.

Sorry for all the edits

I don’t personally like to actually Destroy a Trigger But to disable it etc.

  1. Use Destroy node… But place it carefully or add a Delay node so everything finishes executing.

  2. Or Disable Collision as was said, which can help with CPU and keeps Trigger for later if needed.

  3. Or wire in a Gate node after both Overlap events which gets closed once the event is finished.
    The latter doesn’t help with CPU but its more obvious game logic vs messing around with collision…

  4. Add Do-Once node after Overlap events. But if debugging code live maybe less obvious it fired!

  5. Add Event-Dispatcher / Unbind after first Trigger hit. (Lets you keep game logic in another BP).

ooo event dispatchers? i’m going to look into that. seems it would fix my overwelming branch nodes. lol

As franktech was saying there is multiple ways of doing the same task. use what method is best for what you want it to accomplish.