# Temporarily disable Enemy powers on overlap

**URL:** <https://forum.makecode.com/t/temporarily-disable-enemy-powers-on-overlap/33536>\
**Category:** Help\
**Created:** [February 1, 2025, 8:15pm UTC](https://forum.makecode.com/t/temporarily-disable-enemy-powers-on-overlap/33536 "2025-02-01T20:15:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![missmagneto](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/missmagneto/32/19575_2.png) [@missmagneto](https://forum.makecode.com/u/missmagneto)\
**Post date:** [February 1, 2025, 8:15pm UTC](https://forum.makecode.com/t/temporarily-disable-enemy-powers-on-overlap/33536/1 "2025-02-01T20:15:11Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![CodeOnTheCob](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codeonthecob/32/19306_2.png) [@CodeOnTheCob](https://forum.makecode.com/u/CodeOnTheCob)\
**Post date:** [February 2, 2025, 9:03pm UTC](https://forum.makecode.com/t/temporarily-disable-enemy-powers-on-overlap/33536/2 "2025-02-02T21:03:12Z")

</div>

send the project I’ll help

---

<div class="post-metadata">

**Author:** ![Sonicblaston](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sonicblaston/32/19164_2.png) [@Sonicblaston](https://forum.makecode.com/u/Sonicblaston)\
**Post date:** [February 3, 2025, 4:42am UTC](https://forum.makecode.com/t/temporarily-disable-enemy-powers-on-overlap/33536/3 "2025-02-03T04:42:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![missmagneto](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/missmagneto/32/19575_2.png) [@missmagneto](https://forum.makecode.com/u/missmagneto)\
**Post date:** [February 3, 2025, 5:53pm UTC](https://forum.makecode.com/t/temporarily-disable-enemy-powers-on-overlap/33536/4 "2025-02-03T17:53:47Z")

</div>

> **[galga - shield attempt](https://arcade.makecode.com/S84720-87707-18826-04011)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

@Justcodin @Sonicblaston

Some repeat code from my tinkering but here it goes!

---

<div class="post-metadata">

**Author:** ![redSprite](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/redsprite/32/34262_2.png) [@redSprite](https://forum.makecode.com/u/redSprite)\
**Post date:** [February 3, 2025, 6:41pm UTC](https://forum.makecode.com/t/temporarily-disable-enemy-powers-on-overlap/33536/5 "2025-02-03T18:41:26Z")

</div>

I made this.

> **[Shield-Power-Simulation](https://arcade.makecode.com/65291-04725-73079-47240)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

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

---

<div class="post-metadata">

**Author:** ![CodeOnTheCob](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codeonthecob/32/19306_2.png) [@CodeOnTheCob](https://forum.makecode.com/u/CodeOnTheCob)\
**Post date:** [February 3, 2025, 10:40pm UTC](https://forum.makecode.com/t/temporarily-disable-enemy-powers-on-overlap/33536/6 "2025-02-03T22:40:22Z")

</div>

welcome
