Help! Actors in bottom layer respond when actor in top layer is touched

RD2012RD2012 Member, PRO Posts: 45
edited October 2012 in Working with GS (Mac)
I have a bunch of actors that have "when touch is pressed..." rules on the bottom layer of a scene and then one large actor covering all of them in the top layer of the scene who is destroyed 4 seconds into the game to reveal the actors underneath. The problem is, if the user inadvertently taps the screen when this actor (the large one in the top layer) is still there the actors in the bottom layer respond to the screen touch. Does anyone know of any way to stop this from happening? That is, to make the actors in the bottom layer of the scene not respond when the actor 'on top' of them is touched?

Comments

  • candymancandyman Member Posts: 1
    i'm having the same problem. any one an idea?
  • famekraftsfamekrafts Member, BASIC Posts: 834
    I recently posted the solution in of these threads, just search threads few days back.
  • UtopianGamesUtopianGames Member Posts: 5,692
    edited November 2012
    When you destroy the large actor change a game.boolean canTouch for e.g. to true then in the smaller actors add if canTouch is true to the rule.....

    You could also move the smaller actors out of the way at the start and then change there X Y position when the larger actor is destroyed after 4 seconds...again using a game boolean.

    When using booleans make sure you turn them back to false on scene reset for e.g.

    Darren.
  • UtopianGamesUtopianGames Member Posts: 5,692
    edited November 2012
    Made a quick demo for you...

    Darren.
  • mataruamatarua Auckland, New ZealandMember Posts: 854
    You can put a timer around the behaviour too. That's what I have done for an introduction countdown thing. Not sure if this is best practice?

    Timer after 4 seconds contains the 'when touch is pressed'.
  • RD2012RD2012 Member, PRO Posts: 45
    Thanks for the great info! Darren, I tried downloading your zip but nothing is coming through. Would you mind reposting it? Thanks so much for making a demo!!
Sign In or Register to comment.