When I have a button with an actor ontop of it, why does the button still work? How do i prevent it?

For example. I have a background. When ever I touch it it should make me lose. But I have an actor on top of the background. I have to press that actor as many times as i can to win, but when ever I click on the actor it acts like I am touching the background. Is this a bug or is there a way to fix this?

Comments

  • Slayre77Slayre77 Member, PRO Posts: 115
    Try putting the actor you must press to win in front. Hope this works :)
  • AleksandrGamesAleksandrGames Member Posts: 54
    Try putting the actor you must press to win in front. Hope this works :)
    it's already in the front, but when i touch the actor it makes me lose as if the acter isn't there
  • Slayre77Slayre77 Member, PRO Posts: 115
    Then i think GS is recognizing that both the actor and background and being pressed.So, what u can do is say that if the actor AND the background are pressed (2 conditions for one rule) , then add score or whatever u want it to do :)
  • AleksandrGamesAleksandrGames Member Posts: 54
    Thanks :D
    Sorry for asking, i'm still new to this. How do i do that?
  • crazycam99crazycam99 Paris, FranceMember Posts: 519
    Create a Boolean attribute in the button called covered.
    Create a rule in button actor: when overlaps collide with actor "..."
    change attribute "covered" to true otherwise to false
    Create another rule saying: if touch is pressed and attribute "covered" is false
    (now put whatever you want it to do)
  • AleksandrGamesAleksandrGames Member Posts: 54
    Create a Boolean attribute in the button called covered.
    Create a rule in button actor: when overlaps collide with actor "..."
    change attribute "covered" to true otherwise to false
    Create another rule saying: if touch is pressed and attribute "covered" is false
    (now put whatever you want it to do)
    did all of that. now the button works. it adds the score, but it still changes the scene...
Sign In or Register to comment.