0 votes

basically i have a mainmap scene and it spawns in 25 X25 of these zone nodes (im trying to make a game where you can buy zones) and i set it up so if you click on a zone a popup that is a child of that zone pops up asking if you want to buy the land
the proble here is most of the times when i try to click buy it goes through the popup and selects another zone showing another popup here's my main
map scene tree:

>MainMap       (Node2D)
  >zone_container  (Container zones are instanced child of this node)
  >Cam                         (Camera2D)

and here's my zone scene scene tree:

>Zone (Area2D)
     >Sprite
     >TouchScreenButton
     >IfUnowned  (Popup Dialog)
          >button
          >choose_type    (popup_dialog)
               >button

thanks a lot for taking a look at this
if you need anything else to help just ask in the comments
:)

in Projects by (120 points)

I think you can use CanvasLayer for IfUnowned

i tried that but the clicks still go through even though its less often

or you can use TextureRect over the PopupDialog so that it will catch the input

i tried that too still doesn't work

Have you try set the popup mouse_filter to stop?

yes all of them even the texture rect

Please log in or register to answer this question.

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.

Categories