godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.01k stars 21.17k forks source link

enemy killing issue #30835

Closed Abdelilah-Majid closed 5 years ago

Abdelilah-Majid commented 5 years ago

Godot version:

3.1

OS/device including version:

ubuntu 18.04.2/intel Issue description:

when enter attack is true is when they enter an erea2d called attack ;and it is so close from the player it is as far as its weapon . what hapend is wen i attack a random enemey it get into attack area2d and it call signal _on_attack_body_shape_entered then when i pres the attack botton it call the signal _on_player_hit then it reduces health until it hit 0 then an if methud call queue_free() . i think if i hit a player the health reduces on all enemy code and thats why they all die . what i want from you is how can i attack spesifec enemy and only he die Steps to reproduce:

Minimal reproduction project:

platformer 2.zip

codecustard commented 5 years ago

This is for reporting bug issues regarding the actual Godot Engine and not bugs regarding your particular project. For help, you can go to: https://godotengine.org/qa/ or Discord: https://discordapp.com/invite/zH7NUgz

groud commented 5 years ago

As @sparkart stated, this is not the place to ask about how to use the engine, but to report bugs or ask for new features. Please use the other community channels for that.