enemy wave bar
quinn221
Member Posts: 280
What would the best way be to handel an enemy wave bar.
I am working on a concept where their will be diffrent number of enemys on each scene. For example lets say I want the thrst scene to be a wave of 20 enemies. I would like to have something sort of like a health bar at the to that gets shorter eevrytime a enemy is killed. When it hits 20, the health bar is gone then you move to the next scene.
But when you go to the next scene the wave count will now be higher or lower based on how many enemys I want on that scene.
Any ideas?
Comments
Use the Replicate behavior with the Copies set to game.enemyCount and the Spacing set to self.Size.Width. Make the actor width 10 pixels or whatever you prefer.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
That is kind of what I did, but the problem I am running into is that I want the bar to be the same lenth on each scene. Make sence?
If you want the bar to have the same length, change the actor's width to game.barWidth/game.enemyCount. I haven't tried doing that with Replicate but I'm guessing it would work. So for example, on the first level the width might be 200/20=10 and on the second level the width might be 200/10=20.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Here's a demo.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thnak you this is great!!!!