Hello! So a super simple question, I got this “Office monster” where player has to press a button in 60 seconds after it appears, or it spawns in the office. But I’d like the monster to have a chance to appear again after button is pressed (And restart the 60 second timer)
After you clear the Timer Handle, as shown when you press the button, you need to call your timer count down again.
You already have a Set Timer by Event (Your Monster Timer Handle), that links to a Spawn Monster Function.
I’m not sure what the Whisper Spawn is for, but you should make a function like “Restart Monster Spawn Timer” that feeds into your 60s Set Timer By Event
When you pressed the button, you can just call to the “Restart Monster Spawn Timer” directly. This setup also ensures that handle is cleared every time it’s called.
However, you are using timers incorrectly. They can be set to trigger in a specific time period, instead of setting them looping and checking, like so:
Try to avoid spawning and destroying actors runtime. These are ones of the most costly operations. Hide and disable instead of destroying and move/teleport and enable instead of spawning.
Alright thanks a lot for the help! I just have one problem, where even if I press the button, the “Whisper monster” won’t disappear and the countdown won’t restart, I took these screenshots if you guys happened to know the fix!