Object destruction by user taps

just wondering how something like this could be achieved by the user tapping the object to break it similar to the way the car gets destroyed.

Comments

  • iMaxxGamingiMaxxGaming Member Posts: 14
    edited February 2014
    You're going to need to go to the actor, and create a new rule.

    Make it the following:

    Actor receives event touch is pressed (Like the photo below)

    http://imgur.com/MzXVQy9

    Then, you need to add the Destroy behavior to it.

    http://imgur.com/1TlgdgX


    Then you shall get this:

    http://imgur.com/GxxYZ3j

    That should work!
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Think of it as a manual-step animation. Each frame is changed when the user taps the car. Create an integer attribute called self.Health and set it to the number of frames you plan on having (e.g. 20). The rule for this is When touch is pressed --> Change Attribute self.Health to self.Health-1. And then you Constrain attribute self.Image to self.Health. For this to work, your images should be named 20.png, 19.png, 18.png, etc.

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

  • pHarrisDesignspHarrisDesigns Member Posts: 8
    Awesome guys thanks! I'll try this out tomorrow!
Sign In or Register to comment.