0 votes

So i have 2 scenes: Main and Enemy
In Enemy i have an enemy that loosing hp when i clinking on it and displaying changes on progress barenemy sceneenemy scene in action
But when i adding Enemy scene to the Main scene as instance nothing happens when i clicking on enemy main scenemain scene in action
i know im doing something wrong my guess is that enemy's script is not attaching to instance in main
How to make Enemy's instance in Main behave like it behaving in Enemy scene?

Godot version Godot_v3.4.4-stable_x11.64
in Engine by (24 points)
edited by

1 Answer

+1 vote

Your click is probably getting intercepted by the other controls in your main scene. When running your main scene in debug, click on your enemy, then in the editor open the misc tab of the debug panel. There's a field that tells you what has been clicked. It'll show you which control is blocking your click.

If that is indeed the problem, adjust the offending control's mouse filter property.

by (1,238 points)

yeah you right, im clicking on "Control"
It does not even register that im clicking on enemy, how i can fix this i dont get it?

i just found out if i remove "Control" node its works fine, how can i fix it without removing "control" node?

As I've said, change the mouse filter property on the control node.

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.