Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | ClaireOdendron |
I’m doing the Dodge the Creeps tutorial in the Godot documentation.
In the Connecting HUD to Main section, it says “In the Node tab, connect the HUD’s start_game signal to the new_game() function.”
The “main.gd” script shows as an option to connect to, so I selected that, since the new_game() function is a part of main.gd.
Connecting it makes a new function inside of main.gd:
func _on_HUD_start_game() -> void:
pass # Replace with function body.
So, the part I can’t figure out is, how do I connect it to the other function, new_game, which is also inside of main.gd? new_game is already in there as:
func new_game():
score = 0
$Player.start($StartPosition.position)
$StartTimer.start()
The documentation says “In the Node tab, connect the HUD’s start_game signal to the new_game() function.”, but I can only get as far as placing it in the same main.gd script that new_game is in.