Hello, I have 2 questions:
- I have multiple enemies of the same type in my game that shoot every 2 seconds. How do I make them not all shoot at the same time?
- If they do shoot at the same time the sound effect gets too loud because the sound effect is playing for multiple enemies at once. How do I fix that?
To vary the shooting times, add an object timer and an object variable to the enemy object. The object variable is to hold the duration the timer should run for before firing. This could be set as a random number, to vary the delay between firings for all enemies.
If you must have a 2 second delay between rounds, and just want to stagger the first shot being fired, then you could use the variable like :
Thanks! I got it to work.