All Questions

Community

T
SpareTimer

My Player is Depressed

I've poured over my code, my layer/mask settings, and my project settings. My player is killing himself. Immediately starting the game, the player isn't there. I troubleshot the problem and it's occurring when the enemydetector area and the player collision shape interact. there isn't a layering issue that I can see. I'm unsure what to do. Did something significant change in newer versions of GDScript / Godot that would cause this issue?


  • D
    Vic replied

    May need to watch the video by Nathan on help, Screenshots or maybe a GIF so we can get a better look in case you missed something, Still unresolved?

  • GDQuestions replied

    It's likely an issue in the project. Nothing changed that would change this behavior.

    It's easy to forget or miss a small code detail that causes bugs like those, and when you don't have a lot of experience with a given game engine, it can be hard to find the cause.

    Could you upload your Godot project folder as a zip file to a hosting website like Google Drive and share the download link here? I'll check your project and tell you how to address the issue - I can't do so without seeing the code.

  • T
    SpareTimer replied

    Hey! Thank you both for replying. I used a fix that Razoric gave me over in the discord. When I get the chance I'm going to go compare my code from this project to the final side by side to see what I missed.  I'll upload a Drive link if I'm still having issues. Thank you for your response and I apologize for not replying sooner! 

  • D
    thcod replied

    In Godot 3.4.2, the parameter of the EnemyDetector body_entered function defaults to "body: Node" instead of "body: PhysicsBody2D". My player was also being killed immediately, and changing it to PhysicsBody2D fixed it.