So, I followed the tutorial upto the complete "Heads up display" section.
The issue I'm seeing in my game is, the mobs are spawning and freezing on screen after travelling some distance.
Once they freez the player cannot interact/colloid with them. New ones keep spawning and freezing.
If player touches them before they freez, game-over.
Please help.
Dodge the creeps not working as expected
Are there any warning or error messages?
The quickest way to solve your problem is to upload the project folder as a .zip, so we can look at it. Don't include the .godot subfolder in the .zip.
And provide your exact Godot version.
My Godot version:
Godot Engine v4.2.2.stable.official.15073afe3
DaveTheCoder
There were no error or warning
- Edited
- Best Answerset by amityadav
In the Mob scene, you added a VisibleOnScreenEnabler2D node. That should be VisibleOnScreenNotifier2D.
https://docs.godotengine.org/en/4.2/getting_started/first_2d_game/04.creating_the_enemy.html#node-setup
That's an easy mistake to make.
Delete the node, add the correct type and repeat any setup that the instructions require.
T__T thank you so much!
it worked.
Can you tell me how you debugged it?
I stared at it for a while and eventually noticed the VisibleOnScreenEnabler2D node, which looked strange, since the VisibleOnScreenNotifier2D is what's needed to delete the mobs when they move off-screen. Then I checked the documentation to confirm the mistake.
An alternative method is to review the tutorial line-by-line, and check for mistakes.
I thought some debugger tool could have helped here, which I didn't know how to use. I tried some breakpoints but it didn't help.
Need to understand each nodes properties I use.
Thank you so much once again!!!
I added some code for debugging. I printed out info, and tried limiting the number of enemies. But it didn't help in this case.