Releasing mouse on actor triggers multiple layers

SirCrocketz

  • Posts: 24
attached is a video of what I mean.

When I select a blank hex, it provides a "menu" of blue, green, and purple. when I select one, the blank hex turns into my selection, works beautifully. The problem is that the blank hex underneath my selection is also being triggered. Is there a way to get around that?


TheIndieStation

  • *
  • Posts: 2263
Its a common problem. My solution is to use a scene behavior that checks on what actors you click, compare the Z-index or layer ID's the actors are on, and only trigger whatever code you wanted to trigger trough a custom event on that actor that is on the highest layer/z index

SirCrocketz

  • Posts: 24
I attached my code.

Could you provide an example of the scene behavior you're referencing? I don't exactly follow. I apologize I'm new to this.