Need Help with multiple hit to destroy option.
Good evening Guys,
I started using GameSalad about two weeks ago and I am working on my first game. Right now I am working on the mechanics like many of you probably are and I am running into a bit of a snag. I have a hero that reacts to a Melee button. I have an enemy that is destroyed when it comes in contact with the Melee area and the button is pressed. What I want to do is to set up the enemy actor to be destroyed on a more the 1 hit. I am talking maybe 2 or 3 hits depending on the enemy. I will be working on 4 - 6 different enemy characters and they will be using the same attribute but the numbers will be different. Any ideas or suggestions will be very helpful. Been hitting the wall with this one for the last 2 days.
Regards,
Baoh
Comments
Each enemy will need to have its own self.health integer attribute that gets reduced when the enemy collides with the melee area actor and a boolean attribute called game.attacked is true. In your button actor, change game.attacked to true when the button is pressed and to false otherwise.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thank you for the response tatiang, I will try this out and update.
Thank you so much, Tatiang it worked perfectly. I guess I can use this same concept for the Hero's health. Thank You
You're welcome!
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User