Multiple Enemies of same type

In my game I have multiple of the same enemy spawning and are in the game at the same time. I made an attribute for health and created a rule saying whenever a bullet hits the enemy the enemies health goes down one. I have the problem of the enemies all sharing one pool of health meaning that if I do one damage to an enemy it does one damage to ALL enemies. Is their a way for me to give each copy of an actor their own health automatically when they spawn. Thanks in advance since I know this community is very helpful.

Comments

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

    You need to make the enemy health attribute an actor (self) attribute instead of a game attribute. Game attributes are global while self attributes are local to each actor. Make sure your collision rule for changing self.health is in the enemy actor not the bullet actor.

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

Sign In or Register to comment.