# Adding an event to "on life zero"

**URL:** <https://forum.makecode.com/t/adding-an-event-to-on-life-zero/2766>\
**Category:** Arcade\
**Created:** [July 14, 2020, 12:05pm UTC](https://forum.makecode.com/t/adding-an-event-to-on-life-zero/2766 "2020-07-14T12:05:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Coreyhughes2020](https://avatars.discourse-cdn.com/v4/letter/c/a587f6/32.png) [@Coreyhughes2020](https://forum.makecode.com/u/Coreyhughes2020)\
**Post date:** [July 14, 2020, 12:05pm UTC](https://forum.makecode.com/t/adding-an-event-to-on-life-zero/2766/1 "2020-07-14T12:05:32Z")

</div>

I am trying to make my player sprite be destroyed on life zero and then game over but the game over is taking priority and it wont destroy the sprite with effects even though i have that code first? is there a way to allow both of these to happen. i have a pause block in between destroy and game over lose but it still wont work

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [July 14, 2020, 3:51pm UTC](https://forum.makecode.com/t/adding-an-event-to-on-life-zero/2766/2 "2020-07-14T15:51:26Z")

</div>

You need to use (err…who made the timers extension…JK) @darzu’s timers extension and wait a bit before saying game over.

Here is the link:

> **[destroy sprite before game over](https://arcade.makecode.com/59776-61147-80919-06333)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

@darzu’s Forum post about the timers extensions:

> [@Timers extension: after X, debounce, throttle, and in-background](https://forum.makecode.com/t/timers-extension-after-x-debounce-throttle-and-in-background/1925):
>
> Hello world, I create a new “Timers” extension: [https://github.com/darzu/arcade-timers](https://github.com/darzu/arcade-timers) Early beta. Sample: [https://makecode.com/\_c57bYTea0RFV](https://makecode.com/_c57bYTea0RFV) Blocks Examples “After X do” / aka setTimeout: “Separately do” / aka run in background thread: “after Y settled for X do” / aka debounce: “for Y at most once every X do” / aka throttle:

Link to import the timers extension:

> **[GitHub - darzu/arcade-timers: Timers and execution control for MakeCode Arcade](https://github.com/darzu/arcade-timers)**
>
> Timers and execution control for MakeCode Arcade. Contribute to darzu/arcade-timers development by creating an account on GitHub.

 ![Screenshot_20200714-114840](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/0/0d11b9000f8a95934b442728a241ff75696788c0.png)

---

<div class="post-metadata">

**Author:** ![LcAtonal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/lcatonal/32/16800_2.png) [@LcAtonal](https://forum.makecode.com/u/LcAtonal)\
**Post date:** [July 16, 2020, 8:08am UTC](https://forum.makecode.com/t/adding-an-event-to-on-life-zero/2766/3 "2020-07-16T08:08:52Z")

</div>

niceeeee

---

<div class="post-metadata">

**Author:** ![LcAtonal](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/lcatonal/32/16800_2.png) [@LcAtonal](https://forum.makecode.com/u/LcAtonal)\
**Post date:** [July 16, 2020, 8:09am UTC](https://forum.makecode.com/t/adding-an-event-to-on-life-zero/2766/4 "2020-07-16T08:09:17Z")

</div>

I have not coded for a while 😅

---

<div class="post-metadata">

**Author:** ![purna079](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/purna079/32/4018_2.png) [@purna079](https://forum.makecode.com/u/purna079)\
**Post date:** [September 2, 2020, 4:52pm UTC](https://forum.makecode.com/t/adding-an-event-to-on-life-zero/2766/5 "2020-09-02T16:52:14Z")

</div>

thank you that helped me so much
