All Questions

Community

A
Dipesh Aggarwal

Enemy doesn't die on Stomp

Game File: https://drive.google.com/file/d/1332PaQuTqV-GL7U1rE1S78SFeO2Lxpxb/view?usp=sharing

I know it's something related to positioning of my Area2D and Collision nodes but for the life of me, I can't figure out what's wrong.

I know there is a simpler method, but I want to learn the original method because I will have to use it one way or another.

Thanks

Details:

Godot v3.2.3 (stable)

OS: Windows 10 x64

  • A
    Dipesh Aggarwal replied

    Any help?

  • Nathan Lovato replied
    Solution

    Looking at it now, here are some issues:

    1. Your enemy is on the same physics layer as the player, so the StompDetector detects the enemy as a stomp.
    2. You made changes to the Player node inside LevelTemplate, which overrides its default values set in Player.tscn. When you play your level, your Player node is on physics layer 2 instead of 1, so the StompDetector will never detect it.

    These two combined are what's preventing the system from working.

    Hope this helps.

  • A
    Dipesh Aggarwal replied

    Thanks. That solved it. :)