Unable to progress to level 3 in Martian Mike

After following the steps in the “More Levels” episode of the “Martian Mike” section of the Godot 2D course, I’m unable to progress from level 2 to level 3. When I walk into the exit area, it does not react to the player character at all. I double checked and level_2 has level_3 defined as the “Next Level” variable in the inspector so that shouldn’t be the issue. I added a print statement to the “_on_exit_body_entered” function but it does not get printed which leads me to believe that for some reason the signal is not emitted from the exit node. What is perplexing is that transitioning from level 1 to 2 works but not from 2 to 3. Even if I run just level 2 with F6, it still doesn’t work.

Any ideas what could be causing this? I tried changing the code based off the suggestion in this thread but the issue still persists which further solidifies my belief that the signal is not being emitted for some reason.

I remember that feeling of not having faith in groups and signals during this course. Several times even! But it always turned out to be something else. Since you have a working Exit, I can just about guarantee the signal itself is not where the problem is.

In this case, if your print statement isn’t firing at all, that actually suggests that your collision isn’t working. Not sure why that would be, but that’s what I would investigate first - both the scene trees and the relevant inspectors. Good luck!

Thanks for the advice! I think you’re right, the collision is not happening. It’s perplexing because the collision does work in the first level but not the second one, and the collision with the platform on the exit area does work in the second level so only the collision on the circle collision shape in the does not work after the first level.

I’ll have to look more into this when I have some time.

1 Like

Let us know how you get on with your investigations.
If you are still stuck after going through we can take a closer look and see why its not working.
We have a system where we can get you to upload your project and we can take a look directly to see if we can figure out what is going on but often it helps students to go through the bug hunting process rather than just giving the answer :slight_smile:

Keep us updated and we will help in whichever way you feel is best for you

1 Like

Thanks for the suggestion! I was able to find the root of the issue!

I had accidentally set the collision layer of the player node in the player scene to “world” instead of “player”, and then I had fixed this only for the player instance in level 1. This is why collision was not happening beyond level 2.

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms