-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dodge the creeps is helpful but outdated and no longer works completely #7022
Comments
I went though this tutorial: Using GDScript: The tutorial is almost correct (except for the signals and some minor errors), I was able to finish and run the game. Using C#: There are quite a few issues, I am working on PR to fix them. If you tried with GDScript what kind of issues are you facing? |
I coded it in GDScript and after coding the player once I wrote hide() the
player never showed up again so I just assumed it was due to the signals
because they were causing errors. I have never coded before (except on
scratch) and so didn't know how to fix it thank you for noticing my
complaint so if you could just try to fix errors on GDScript as well as C#.
…On Wed, Mar 22, 2023 at 2:43 PM Dipal Zambare ***@***.***> wrote:
I went though this tutorial:
*Using GDScript:* The tutorial is almost correct (except for the signals
and some minor errors), I was able to finish and run the game.
*Using C#:* There are quite a few issues, I am working on PR to fix them.
If you tried with GDScript what kind of issues are you facing?
—
Reply to this email directly, view it on GitHub
<#7022 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A6TB7RPRGJKS3R36ELBU2VLW5NXBLANCNFSM6AAAAAAWALS2M4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
OK, thanks for the info! |
No problem!
…On Thu, Mar 23, 2023, 2:50 AM Dipal Zambare ***@***.***> wrote:
OK, thanks for the info!
—
Reply to this email directly, view it on GitHub
<#7022 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A6TB7RMCHU2THVS6N2VPD6DW5P6CXANCNFSM6AAAAAAWALS2M4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I was stuck in the 2d tutorial here. I think there is a step missing: The user has to add (drag/drop) the "Player" scene to the "Main" scene. |
Line 12, in the same file explains the step to add Player instance in Main
scene.
…On Fri, 24 Mar 2023, 00:17 mj-h, ***@***.***> wrote:
I was stuck in the 2d tutorial here
<https://github.com/godotengine/godot-docs/blob/e22128ca06e923d58be3eebe9a0fa01b0d4e2c9f/getting_started/first_2d_game/05.the_main_game_scene.rst?plain=1#L185>.
I think there is a step missing: The user has to add (drag/drop) the
"Player" scene to the "Main" scene.
—
Reply to this email directly, view it on GitHub
<#7022 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMP3QPAFJCRVXDQCWE4QQWLW5TK2HANCNFSM6AAAAAAWALS2M4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I had a similar issue as Daniel, but after finishing "the main game scene" section, the player became visible again. I don't think this is actually a bug but it would likely be helpful to new people to point out that the game won't really be testable again from the end of the the player section until the end of the main section. At least, that is what I thought was going on. For me, the player does not get hidden when colliding with the mob - searching for information about that is what lead me to this thread. I'm not sure if this is problem on my end or not. |
I'm stuck on the OnBodyEntered() part of the "Coding the player" section. I'm using C#. Its a bit odd, because I'm connecting the signal, but getting an error as soon as I try and build the code that Godot imports.. Errors I'm getting: line 76 is this: private void _on_body_entered(Node2D body) it seems like this might be a Godot issue, though, not a tutorial issue.. almost like the inserted code is supposed to go in the class, but the built in function generated the code outside the class. |
You need to move the signal handler inside the player class (just move it
before the last '}').
This is known issue in godot c#.
…On Sun, 2 Apr 2023, 05:33 Creidhne86, ***@***.***> wrote:
I'm stuck on the OnBodyEntered() part of the "Coding the player" section.
I'm using C#.
Its a bit odd, because I'm connecting the signal, but getting an error as
soon as I try and build the code that Godot imports..
Errors I'm getting:
...\2d_Game_Dodge_Creeps\player.cs(76,1): Top-level statements must
precede namespace and type declarations.
...\2d_Game_Dodge_Creeps\player.cs(76,1): The modifier 'private' is not
valid for this item
line 76 is this: private void _on_body_entered(Node2D body)
—
Reply to this email directly, view it on GitHub
<#7022 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMP3QPFXU7OLFJV5Z5RMQ43W7DXSJANCNFSM6AAAAAAWALS2M4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I've recently seen some people get confused about this, so I think it would be nice to add a note in the tutorial about this until the bug is fixed. |
I think I've worked this out, the tutorial code for the player's start func in gdscript has |
That doesn't hide anything, the hide code is three lines above, the "disabled" just disables the collision shape so it doesn't collide any more, it isn't drawn anyway |
You misunderstand. This is the code to enable the collision for the player on start. It doesn't work, so when the mobs should hit the player they pass straight through and never trigger the hiding of the player. |
The "Getting Started 2D Section" received multiple bugfix and enhancement PR's since this issue was opened. Please feel free to ask for help in any of the offical Community Channels if you are stuck at any point of the tutorial. |
4.0
I followed the dodge the creeps tutorial as someone completely new to coding and game dev. It was helpful only to a point. I finished coding player movement and did the rest of the code and it ran but nothing showed up no HUD or Mobs or even the player. When I was coding it there were some things that were outdated and no longer worked but most were not a very big deal. Except for the signals. I could make new signals but the emit code was null so didn't work I tried to rig something together. I am assuming the reason the game didn't start was because it didn't emit or call the new_game signal but, that is just a guess please update the tutorial so it doesn't have this problem in the future or add a warning saying "this is outdated and doesn't work except for player movement."
thank you for everything but please try fixing the problem.
https://docs.godotengine.org/en/stable/getting_started/first_2d_game/index.html
The text was updated successfully, but these errors were encountered: