Temporarily disable Enemy powers on overlap

Hello Board,
I have a conundrum I’ve been trying to resolve for a student using blocks to code a Galga style game on Makecode Arcade, here’s where I hit my creative block:

On game update every 800ms an enemy appears.
On game update every 5000ms a “Shield” spirit appears that upon overlap with the Player should disable the enemy life destructing powers for 30seconds. After the 30 seconds the enemy sprites can once again take a life with each overlap.
The game runs with a 60seconds countdown till the end.

The enemy change on overlap seems to apply to only a single enemy sprite and the rest continues to take my player’s lives. I’ve tried tinkering with conditionals upon game update without making any difference to the game. Creating a function also didn’t seem to tackle the core issue being a new enemy on the screen every 800ms.

I got a feeling there’s a very straightforward way to resolve this but I’ve tinkered with coding blocks so much my mind’s asking for a break.

How should I resolve this using blocks only?

1 Like

send the project I’ll help

Could you share the project link for us to take a look at? To share a link, press the share button in the top right corner of the code editor.

@Justcodin @Sonicblaston

Some repeat code from my tinkering but here it goes!

I made this.

I don’t think it’s EXACTLY how you wanted, but I made a simulation nevertheless.

Press A to spawn an enemy
Press B to spawn a shield powerup

Shield lasts for 10 seconds

welcome