0 votes

I'm doing the beginners tutorial here:

https://docs.godotengine.org/en/stable/getting_started/step_by_step/your_first_game.html

I was following it fine, but about 3/4 of the way in, everything becomes very confusing and it stops specifying what scene to put code into. It's the part that starts with "Next, select the Player node in the Scene dock, and access the Node dock on the sidebar. Make sure to have the Signals tab selected in the Node dock." (I can't link it but you can Ctrl+F it)

It's saying to make a gameover function and a newgame function, but making those in the Player.gd script doesn't work, the IDE says "The identifier "score" isn't declared in the current scope." I thought I would try moving these functions to the Main.gd script, but that didn't work either.

In any case I'm at the "Testing the scene" part and it won't even run. Any ideas? Also any recommendations for better tutorials to use, this is just what I'm seeing on the website.

Godot version 3.3.stable
in Engine by (17 points)

1 Answer

+1 vote
Best answer

That text is in the "Main scene" section. You should be clicking on the Player node in the Main scene, not in the player scene. It's right below where you were shown this image:

enter image description here

You connect those signals and the functions will be created in main.gd.

by (21,940 points)
selected by
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 Frequently asked questions and 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 [email protected] with your username.