Game development Problem

So I’m making this game where some enemies will go bye you and you can shoot them to get points. After you get a specific number of points I want all of the enemies on screen to disappear so I can let the big boss of the game arrive. Can any of you guys help me get rid of the enemies?

Here’s my code if anybody wants to look.

https://arcade.makecode.com/S52316-11352-35928-14172

2 Likes

This block can do that! :slightly_smiling_face:
image

1 Like

A simple solution would be something like this:


Where you simply turn the “spawnBadguys” variable to “false” and it will stop spawning them. You can use a short delay with a pause block to make sure that the sprites are all off the screen before spawning the big bad guy, which looks better than if you simply deleted them all instantly, which you could do with a “destroy all sprites of kind [kind]” block but would look weird.

1 Like

Ohhh… you’re so right, I hadn’t even thought about how they keep spawning! :exploding_head: And that’s a great idea to have a delay before destroying them all! Thanks for the additions :slight_smile:

1 Like

Thx a lot, that’s really helpful :slight_smile:

2 Likes