Making Actors Change images a few times before being destroyed

I want my main actor to collide with the enemies and have the enemies change color. I want to make it so that the enemies will change color after the first time they are hit, then change to another color the second time they are hit, and then be destroyed on the third time they are hit.

Comments

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

    Give your enemy actor an integer self attribute called self.hitCount. Each time they collide with the main actor, increase that attribute by one. Have rules for each possible value of the attribute that change the actor's color attributes or image, or that destroy the actor.

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

Sign In or Register to comment.