Instance of an enemy does not behave right in main scene

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By hrp

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?

:bust_in_silhouette: Reply From: Bernard Cloutier

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.

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?

hrp | 2022-08-08 17:22

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

hrp | 2022-08-08 17:39

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

Bernard Cloutier | 2022-08-08 18:14