# Killing an enemy if player jumps over the enemy

**URL:** <https://forum.makecode.com/t/killing-an-enemy-if-player-jumps-over-the-enemy/28242>\
**Category:** Arcade\
**Created:** [April 15, 2024, 5:11am UTC](https://forum.makecode.com/t/killing-an-enemy-if-player-jumps-over-the-enemy/28242 "2024-04-15T05:11:21Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mega0star01](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mega0star01/32/14784_2.png) [@Mega0star01](https://forum.makecode.com/u/Mega0star01)\
**Post date:** [April 15, 2024, 5:11am UTC](https://forum.makecode.com/t/killing-an-enemy-if-player-jumps-over-the-enemy/28242/1 "2024-04-15T05:11:21Z")

</div>

like in mario, where you jump over the enemie to kill it.

---

<div class="post-metadata">

**Author:** ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)\
**Post date:** [April 15, 2024, 4:34pm UTC](https://forum.makecode.com/t/killing-an-enemy-if-player-jumps-over-the-enemy/28242/2 "2024-04-15T16:34:16Z")

</div>

Are you asking how to do this? I think this has been done: [mySprite jumping on top of enemies?](https://forum.makecode.com/t/mysprite-jumping-on-top-of-enemies/27993)

---

<div class="post-metadata">

**Author:** ![Banandez](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/banandez/32/12198_2.png) [@Banandez](https://forum.makecode.com/u/Banandez)\
**Post date:** [April 15, 2024, 4:34pm UTC](https://forum.makecode.com/t/killing-an-enemy-if-player-jumps-over-the-enemy/28242/3 "2024-04-15T16:34:25Z")

</div>

If you make it so that when the player jumps on the enemy the enemy dies,  
add gravity to the enemy so when you jump on it has a cool dropping animation.  
But im not sure how to make it so that it kills you when you touch it from the side.

---

<div class="post-metadata">

**Author:** ![soren\_lorenson](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@soren\_lorenson](https://forum.makecode.com/u/soren_lorenson)\
**Post date:** [April 15, 2024, 4:35pm UTC](https://forum.makecode.com/t/killing-an-enemy-if-player-jumps-over-the-enemy/28242/4 "2024-04-15T16:35:08Z")

</div>

I SUMMON @richard TO HELP @Mega0star01

---

<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:** [April 15, 2024, 4:35pm UTC](https://forum.makecode.com/t/killing-an-enemy-if-player-jumps-over-the-enemy/28242/5 "2024-04-15T16:35:27Z")

</div>

Here’s a demo. Press B to spawn an enemy

> **[Stumping on enemies](https://arcade.makecode.com/78040-51179-01814-89019)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [April 15, 2024, 4:39pm UTC](https://forum.makecode.com/t/killing-an-enemy-if-player-jumps-over-the-enemy/28242/6 "2024-04-15T16:39:19Z")

</div>

@Sonicblaston’s example is pretty much what I would have posted!

---

<div class="post-metadata">

**Author:** ![Mega0star01](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mega0star01/32/14784_2.png) [@Mega0star01](https://forum.makecode.com/u/Mega0star01)\
**Post date:** [April 15, 2024, 4:39pm UTC](https://forum.makecode.com/t/killing-an-enemy-if-player-jumps-over-the-enemy/28242/7 "2024-04-15T16:39:35Z")

</div>

thanks, that’s exactly what i need.

---

<div class="post-metadata">

**Author:** ![InvalidProject](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/invalidproject/32/32554_2.png) [@InvalidProject](https://forum.makecode.com/u/InvalidProject)\
**Post date:** [April 15, 2024, 9:10pm UTC](https://forum.makecode.com/t/killing-an-enemy-if-player-jumps-over-the-enemy/28242/8 "2024-04-15T21:10:40Z")

</div>

![Screenshot 2024-04-15 1.42.24 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/d/d245bff408b19de70e720edefc6c74bb28694978.png)  
Man, I love this game!

---

<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:** [April 16, 2024, 4:59pm UTC](https://forum.makecode.com/t/killing-an-enemy-if-player-jumps-over-the-enemy/28242/9 "2024-04-16T16:59:18Z")

</div>

I sense that someone has been spamming the B button

---

<div class="post-metadata">

**Author:** ![Mega0star01](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mega0star01/32/14784_2.png) [@Mega0star01](https://forum.makecode.com/u/Mega0star01)\
**Post date:** [April 16, 2024, 6:24pm UTC](https://forum.makecode.com/t/killing-an-enemy-if-player-jumps-over-the-enemy/28242/10 "2024-04-16T18:24:12Z")

</div>

i didn’t.

---

<div class="post-metadata">

**Author:** ![ChimbroDaPro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/chimbrodapro/32/15852_2.png) [@ChimbroDaPro](https://forum.makecode.com/u/ChimbroDaPro)\
**Post date:** [April 16, 2024, 7:40pm UTC](https://forum.makecode.com/t/killing-an-enemy-if-player-jumps-over-the-enemy/28242/11 "2024-04-16T19:40:40Z")

</div>

Bro, that’s pretty bold
