How to remove object in a scene after touch at second time?

kevinbalor@yahoo.comkevinbalor@yahoo.com Member Posts: 0
edited February 2013 in Working with GS (Mac)
So I was making a mystery game. Let's say I click a scene and inside that scene there is a Bottle. If I click that Bottle it will disappear and change the scene with no bottle. Then go back to the main scene. after I click the scene that has a bottle I clicked it should not appear again. How?

Comments

  • ChakkuChakku Member Posts: 1,513
    @kevinbalor@yahoo.com

    Use the 'Destroy' behavior on the actor once it's clicked. Don't worry, it will still switch scenes, but that actor will be gone from then on!

    Hope this helps
    Chakku
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Not if your changing scenes. The scene will restart when you go back. You need to have a Boolean that when true change the bottles alpha to 0 and in the touch is pressed rule add when attribute self.color.alpha = 1 this will disable the touch rules if the alpha is 0
  • ChakkuChakku Member Posts: 1,513
    edited February 2013
    @FryingBaconStudios

    Oh nice! You caught my mistake.

    I thought he couldn't get it to disappear :/


    Yeah, just change a boolean to toggle alpha 0/1, and it will save even if you change scenes! :)



    Sincerely,
    King Chakku

    (P.S. If this post was 'Insightful', please show your appreciation by clicking on the 'Insightful' button at the bottom of this post! Thanks, I appreciate it!)
Sign In or Register to comment.