What happens right now...
I have a conundrum about how to approach movable units on a TileMap. I'm using Area2D for the units, and this offers the
input_event signal to check when a unit has been clicked. This works fine. In order to move units, I need to select a tile on the TileMap, which I can do with
However, clicking on a unit (Area2D), also triggers an event on the TileMap. What's more, the TileMap event is fired first due to the order in which events and signals work. Whenever I click on a unit, the tile beneath it receives an event too, and ahead of the unit.
What I want to achieve...
Ideally, I want the unit to receive its event/signal first and the event to propagate no further. Is Area2D the wrong node to be using for a unit that I want to be selectable? Can you recommend another approach?
Any help would be appreciated. Thanks! :)