How to detect touch that is inside the screen but outside of two actors?

So I have a background actor which is basically the entire active screen. Any touch on this should cause a scene change, except when the touch lies within one of two nonoverlapping actors which are also on the screen.

So say actors A and B are on the screen. If either are pressed the scene should not transition. How would I handle this? This was easy with one actor since I could just say if touch is outside of A, but I'm not quite sure how to do this for 2 actors (or in the general case of N actors)

Comments

  • ArmellineArmelline Member, PRO Posts: 5,441
    Perhaps something like this?

    I'm afraid I made it in the latest nightly before I noticed which version of GameSalad I'd opened, but it looks like you're Pro so hopefully you have it. If not, you can get it :D
  • BacktothisBacktothis Member, PRO Posts: 75
    uh how do i open that o.O
  • ArmellineArmelline Member, PRO Posts: 5,441
    edited March 2014
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Funny, someone else wanted to detect "rogue" touches and not allow them... you actually want to use a rogue touch. Here you go.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    uh how do i open that o.O
    You'd need to open it in the Nightly build available at http://gamesalad.com/download/releases.
  • BacktothisBacktothis Member, PRO Posts: 75
    Oh man I'm facepalming when I just realised how simple it is looking at your code. Thanks!
Sign In or Register to comment.