I’m writing a basic platforming game to learn Godot and gdscript
When the character collects enough items on each level the code jumps to a transition scene before starting the next level. I found this a bit jarring so I tried to introduce a slight wait with create_timer but the code isn’t working…testing code:
There are a few things to consider when working with coroutines, and some info that is not mentioned in the original post.
When calling pause2() there could be a need for another instance of the await key word in the call stack.
What is the parent function calling pause2()?
The other thing is that the await keyword does not block the processing thread. It returns to the calling function, saving the remaining code to process after the signal event.
Could it be that once pause2() returns awaiting for the timeout signal that you go to delete the scene with this running script?