Dodge the Creeps: Failure to Loop

Godot Version

4.3 Stable Windows

Question

I’ve been doing the tutorial for the Dodge the Creeps and I’ve gotten the last section, but I haven’t been to finish it because at the last section the game fails to loop. Either it doesn’t game over, or it does the equivalent of a crash and ends prematurely. I’ve attempted to troubleshoot the problem myself, but at this point, I’ve seemed to done everything correctly according to instructions, and it’s still not really working. I’m asking for some assistance since I don’t seem to know how to fix this problem.

You need to show your project/code otherwise we can’t help

Oh, right, sorry.

This is the section I seem to having the trouble most with.

What problems you’re having in this code?

Well, whenever the player gets it by the creep, instead of the game showing the “game over” screen, it either continuously loops or simply does the equivalent of an “crash” where it just stops and goes back to the window. I’m not sure why it’s not looping properly and I’m no closer to solving the problem myself.


Here is the code of the HUD section.

Hm, can you upload the project somewhere like the google drive so i can take a deep look?

Here it is: time-to-find-out.zip - Google Drive

The only problem i found was In your hud script, after fix that i didn’t find anything else wrong:

func show_game_over():
	show_message("You suck. Try again!")
	#This is waiting for the timeout
	# Timeout is a signal, not a function, you don't
	# use the ()
	#await $MessageTimer.timeout()
	await $MessageTimer.timeout
	
	$Message.text = "Dodge The Creeps"
	$Message.show()
	#One Shot Time
	await get_tree().create_timer(1.0).timeout
	$StartButton.show()

Huh, how did I miss that? Thank you, I would had been lost for a month if I didn’t figure that out.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.