This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

Hi, Im following the tutorial (your first 2d game) and I almost finished it but now I dont get a game over message once the chararacter dies. And I get this Error:
E 0:00:06.685 emitsignal: Error calling method from signal 'hit': 'Area2D(': Method not found..

I dont know how to fix it.
Download my files:

Godot version 3.5.2
in Engine by (14 points)

2 Answers

0 votes

The player's 'hit' signal is mapped to itself; you can see this in the editor on the 'Node' tab when the player is selected. I think it should be mapped to the 'Main' node as that has the game_over method. To fix it, go into the player scene and disconnect the signal. Reconnect the signal in the Main scene.

When connected, you can confirm it calls the correct method by double-clicking the signal and godot will open the code editor at the right method.

by (1,406 points)

Thank you so much this fixed it!

+1 vote

I'm not overly familiar with the tutorial but it looks like you've attempted to connect the hit signal on the Player node to a non-existent game_over() function in the script.

Instead, I think you want to connect that signal to the EXISTING game_over() function found in the script.

You can fix that by right-clicking the errant signal (in the Signals tab), selecting Edit, and selecting the Main node in the dialog that opens.

by (22,704 points)

Thank you so much this fixed it!

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.