Spawn entre trigger box

What if I made a trigger box that spawns an enemy when entering, but when entering and exiting the box they keep spawning, is it possible that it only spawns it once?

Hello! A simple solution can be found a few different ways.

#1. Have a gate at the start of your spawning script, that closes once an enemy has spawned, simply take the ending exec pin, and connect it to the close function on the gate.

#2. Destroy the trigger box. (not recommended most of the time?)

#3. Disable Overlap event after trigger, by unbinding the overlap event.

Also, if you wish for your ‘trigger box’ to rearm itself over a set period of time, There are more than a few options.
Such as Do Once. Do Once Delay.
As an added benefit, Do Once has an exec pin that resets the do once command, and reopens it.

If you wish the trigger box to respawn on a time delay, you can use a timeline, or tick delay seconds interval. To keep a majority of the script off the event tick, so it is not expensive for system resources to maintain.

1 Like

On Begin Overlap (trigger box) → Set collision (no Collision) → Spawn Enemy.

Done!

To Re-use, Trigger box → Set collision (Query Only)… Done.