dont touchhh again again again... :(

cercan57cercan57 Member, PRO Posts: 6

I want to animate when I click once but disappear after 0.2 seconds. that actor must never be touched again... not allowed to touch. I want it to be closed when I click a few times. can you help?

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Make a boolean called self.Touched. It should be false (unchecked) to start with.

    When touch is pressed
         Change attribute self.Touched to true

    When attribute self.Touched is true
         Animate
         Timer after 0.2 seconds
              Change Attribute self.color.Alpha to 0
         

    What does it mean to "close" an actor? And how many times is "a few times"?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    The "never be touched again" part is taken care of because a rule only fires when its condition changes value (e.g. from false to true). So when self.Touched changes from false to true, the rule fires. But if you touch the actor again, self.Touched is already true and the rule doesn't fire.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • cercan57cercan57 Member, PRO Posts: 6

    Thank you, very very good

Sign In or Register to comment.