How can I use await to wait just a few seconds without needing a signal to be activated to just delay code execution ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By lucaswt

my function is to spawn enemies so I want to delay it

:bust_in_silhouette: Reply From: Enfyna

Why dont you use this :

await get_tree().create_timer(1).timeout

like in the answer you linked.This will delay your code and you dont have to create a new signal for it.And you can easily edit the delay time too.