Here’s my problem, I’m making an anomaly game, when a player passes through a trigger, it has a chance to spawn anomalies in the house and sets a variable “ Anomaly active”, currently I have a spawn actor at location when they pass through the trigger and the anomaly active variable is set to true, it’s nothing fancy It just checks if the actor is valid in the world, and if not fires a delay of 75 seconds, then spawn the actor and sets a boolean variable true that is spawned.
In this anomaly game, if anomalies are active, you turn around and go back through the start trigger, which resets the room to a normal state, and gets rid of the monster prowling around, which it does initially, however when the player does this and goes back through the trigger early before the trigger spawns the monster, it will still spawn on the next loop, whether an anomaly is active or not. I know it has something to do with the initial call to spawn the monster, when it checks if it’s valid in the world or not, but beyond that I’m not really sure what else.
The problem is that DoOnce is being negated as soon as a demon spawns because it is being reset. Then when you destroy the demon you can set IsDemonSpawnedFalse and it will gate properly.
On begin Overlap immediately disable the collision on the trigger component. Then call a timer to re-enable some seconds later. Do all your other logic after the timer call.