Actor help

VGXVGX Member Posts: 796
edited November -1 in Working with GS (Mac)
When an actor is in front of another I can still click the actor behind as if the actor in front isn't there.

How can I make it not do that?

Comments

  • StuartYStuartY Member Posts: 134
    Weirdly, I've just had this problem myself. Here's the solution.

    Create a global boolean variable. Call it "hidden?" or similar.
    Create a rule in your first actor (the one that will be on front) that changes hidden? to true if mouse/touch is overlapping. Use the "otherwise" part of the rule to change hidden? to false.

    When you check if your second actor (the one that is behind) is touched, create a timer on a very short delay (e.g. 0.03s). Create a rule within the timer that checks whether hidden? is false. Then place your normal rules within that rule.

    Maybe there is a more elegant way to achieve this but it worked for me.

    Stu
  • VGXVGX Member Posts: 796
    I will try this. Thanks
Sign In or Register to comment.