0 votes

i have a game project and i use signals to kill enemies using a area2d and a costom signal and i wonder if ther is another way . or any easyer way to do so . thats going to save a lot of time for me .

hir is my project : https://drive.google.com/open?id=1rs3dymaHA7g1N4x8cJIIwwJcS6kZI0rG

the level 1 is in the botom of res its name is scene1

in Engine by (70 points)

thats going to save a lot of time for me.

Are you connecting the signal in the editor's node tab or script?

i connecting the in the editors node

Script is usually easier when you need a lot of nodes to send signals to a parent script. You could also create a separate scene for the enemy and connect the signal there. If you put the enemies in a group like hhuseyincihangir said, you'll have to connect the signal to whatevers killing the enemy, then have it tell the enemy to kill itself.

1 Answer

0 votes
Best answer

Instead of using a signal each time, you can use groups. You add them to the same group.

You can see your example in the video.

Signals and Groups Video

by (52 points)
selected by

thanks a lot

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.