0 votes

I'm following this tutorial:
https://docs.godotengine.org/en/stable/getting_started/step_by_step/your_first_game.html#main-script

And this part

Next, click on the Player and connect the hit signal. We want to make
a new function named gameover, which will handle what needs to happen
when a game ends. Type “game
over” in the “Method In Node” box at the
bottom of the “Connecting Signal” window. Add the following code, as
well as a new_game function to set everything up for a new game:

Is a bit unclear to me
Here I am after dragging Mob.tscn ...

What is most unclear to me is 'click on the Player' part. I would assume its about clicking on Player node tab that is open. But then it's either I'm in wrong place, or the namings of things are different
enter image description here

Because if I proceed ant enter game_over, to the bottom of the 'Connect a Signal to a Method' window. That adds a function to Player.gd script.
enter image description here
And if I proceed with a tutorial

by adding new_game function as shown
enter image description here

The error is making sense to me since score is declared in Main.gd. But this tutorial part does not make sense to me

TLDR: How exactly you're supposed to Next, click on the Player and connect the hit signal. in this guide

in Engine by (15 points)

2 Answers

+1 vote
Best answer

I'm not overly familiar with the tutorial, but I'd guess you were supposed to add an instance of the Player node to the Main scene and it's that Player instance that you should be selecting.

The remaining instructions should then place the new code in Main.gd.

Assuming that's correct, I agree, it isn't very clear...

by (10,916 points)
selected by

Thank you for clarification. I missed that step.

0 votes

Ran into this myself today. Turns out I'd skipped this:

Click the "Instance" button and select your saved Player.tscn.

Once you do that the Player node should be in the Main scene, and that's what this bit...

Next, select the Player node in the Scene dock, and access the Node dock on the sidebar.

...is referring to.

by (14 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.