The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

0 votes

Hi, actually I have a node that has many enemies as children, when i want the character detects an area or shape that belongs to the enemy, works but i notices that i used the absolute path to do this and if i put more enemies in escene, just detects 1 of them, how can I do to make the player detect all the enemies as the same, i dont know if i have to use arrays but when I tried the error message says that cannot conver string array into object.

I hope you can give me some hints

in Engine by (91 points)

Did you set a number higher than 1 at XXXBody(2D) > Contacts Reported of the character?

I will be more specific, there is an area 2d that is child of a rigidbody(player), i want this area detects when another area is overlaping, the area i want to detect is child of the enemy, when i load the escene all works, but when i add more enemies just detect the area of the first one, i use the string "/root/....... as the path to detect the enemy area, I know that I cant use absolute path because just recognizes 1 of the nodes, I need that works on all the nodes(enemy) how to load al the duplicated nodes to be detected as the same one

1 Answer

0 votes

I will be more specific, there is an area 2d that is child of a rigidbody(player), i want this area detects when another area is overlaping, the area i want to detect is child of the enemy, when i load the escene all works, but when i add more enemies just detect the area of the first one, i use the string "/root/....... as the path to detect the enemy area, I know that I cant use absolute path because just recognizes 1 of the nodes, I need that works on all the nodes(enemy) how to load al the duplicated nodes to be detected as the same one

by (91 points)
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 Frequently asked questions and 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 [email protected] with your username.