# Enemy events

**URL:** <https://forum.makecode.com/t/enemy-events/6562>\
**Category:** Help\
**Created:** [March 4, 2021, 5:44pm UTC](https://forum.makecode.com/t/enemy-events/6562 "2021-03-04T17:44:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jloosem](https://avatars.discourse-cdn.com/v4/letter/j/cab0a1/32.png) [@jloosem](https://forum.makecode.com/u/jloosem)\
**Post date:** [March 4, 2021, 5:44pm UTC](https://forum.makecode.com/t/enemy-events/6562/1 "2021-03-04T17:44:36Z")

</div>

Is there anyway to cause an event like change level or change tile map when a current amount or all enemies are destroyed?

---

<div class="post-metadata">

**Author:** ![Agent\_14](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/agent_14/32/17567_2.png) [@Agent\_14](https://forum.makecode.com/u/Agent_14)\
**Post date:** [March 4, 2021, 6:16pm UTC](https://forum.makecode.com/t/enemy-events/6562/2 "2021-03-04T18:16:23Z")

</div>

Yes. On a enemy destroyed, check if the array of all sprites kind enemy is not equal to 0

---

<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:** [March 4, 2021, 6:21pm UTC](https://forum.makecode.com/t/enemy-events/6562/3 "2021-03-04T18:21:09Z")

</div>

> **[Enemy events](https://arcade.makecode.com/20263-86679-47480-42254)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.
