Question
I have a space shooter Python/Pygame game where a player shoots enemy ships. After about 5 minutes, enemies stop spawning. At this point I was
I have a space shooter Python/Pygame game where a player shoots enemy ships. After about 5 minutes, enemies stop spawning. At this point I was to have boss fight take place. But I cannot get the boss ship to spawn once the enemies have stopped spawning. I have a separate class for Boss and Enemies. Getting enemies to stop spawning was fairly easy but I cannot get the boss spawn to work at all. For example, to test I wrote
if pygame.time.get_ticks() > 5000:
boss = Boss()
all_sprites.add(boss)
but the boss never appears. I tried == as well. I also though of trying a USEREVENT but that occurs repeatedly.
How can I get this to work properly? Just for testing purposes I am keeping the time short but it will eventually be around 5 minutes
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started