CHALLENGE 2: A Non-Blocking 2-Second Pause With await ==================================================================== TASK ---- Write a function that prints "Get ready...", uses await with get_tree().create_timer() to pause for 2 seconds, then prints "Go!". Confirm the rest of the scene (e.g. a spinning sprite from Chapter 4) keeps moving during that 2-second pause rather than freezing. SETUP ----- Reuse Chapter 4's spinning-sprite script on a Sprite2D somewhere in the scene, so there's something visibly moving to confirm against. SOLUTION CODE (attached to the scene's root) ------------------------------------------------- extends Node2D func _ready() -> void: _start_countdown() func _start_countdown() -> void: print("Get ready...") await get_tree().create_timer(2.0).timeout print("Go!") OUTPUT (with roughly a 2-second real-world gap between the two lines) ------------------------------------------------------------------------ Get ready... Go! WHY THIS WORKS AS AN ANSWER ---------------------------- get_tree().create_timer(2.0) creates a one-shot Timer object that counts down 2 real-world seconds and then emits its own .timeout signal. await pauses _start_countdown() specifically at that line until .timeout actually fires, then resumes execution from exactly the next line - which is why "Go!" prints roughly 2 seconds after "Get ready...". Confirming the spinning sprite (Chapter 4) keeps spinning throughout that 2-second gap is what proves await only pauses this one function, not the whole game - unlike a blocking sleep() call in plain Python, which would freeze every other running process including the game's own rendering. Godot's own _physics_process loop for the spinning sprite continues running normally on every frame the entire time _start_countdown() is paused, since await only suspends the specific coroutine it's used inside.