# Mario goomba like enemies

**URL:** <https://forum.makecode.com/t/mario-goomba-like-enemies/29183>\
**Category:** Help\
**Created:** [June 9, 2024, 4:28am UTC](https://forum.makecode.com/t/mario-goomba-like-enemies/29183 "2024-06-09T04:28:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harmanuary](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/harmanuary/32/21855_2.png) [@Harmanuary](https://forum.makecode.com/u/Harmanuary)\
**Post date:** [June 9, 2024, 4:28am UTC](https://forum.makecode.com/t/mario-goomba-like-enemies/29183/1 "2024-06-09T04:28:29Z")

</div>

I’m trying to make enemies similar to goombas BUT they can walk off cliffs and stuff, I have the damage system down but when trying to get the multiple ones to have independent actions they wait until all of them hit a wall

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/1/15d781a8a28ad19e2c86dff63f8c8e4f89c1dfac.png)  
here is the code  
I have multiple snakes in the titlemap at once and have either 0, 1, or more mushrooms on screen at once.

---

<div class="post-metadata">

**Author:** ![top\_hat\_lord](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/top_hat_lord/32/33469_2.png) [@top\_hat\_lord](https://forum.makecode.com/u/top_hat_lord)\
**Post date:** [June 10, 2024, 2:54pm UTC](https://forum.makecode.com/t/mario-goomba-like-enemies/29183/2 "2024-06-10T14:54:22Z")

</div>

use the platformer extension and make them that type of sprite. they will have gravity and then you can just make them move left and right while having gravity.

---

<div class="post-metadata">

**Author:** ![Harmanuary](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/harmanuary/32/21855_2.png) [@Harmanuary](https://forum.makecode.com/u/Harmanuary)\
**Post date:** [June 10, 2024, 9:05pm UTC](https://forum.makecode.com/t/mario-goomba-like-enemies/29183/3 "2024-06-10T21:05:25Z")

</div>

idk if im misinterpreting that but i think you are saying something about giving them gravity, but they already do if thats what you are talking about

---

<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:** [June 10, 2024, 9:07pm UTC](https://forum.makecode.com/t/mario-goomba-like-enemies/29183/4 "2024-06-10T21:07:58Z")

</div>

@Harmanuary check out my post here:

> [@A goomba enemy](https://forum.makecode.com/t/a-goomba-enemy/28562/3):
>
> @mcodes and if you do decide to make your goombas move, that’s easy too. The simplest method is to use the “bounce on wall” flag for sprites: However, this isn’t true “goomba” behavior because it won’t work for sprites that have gravity. In mario, goombas fall down when they walk off a ledge. To copy that behavior, we can use an “on hit wall” event instead: There are comments in both those example that explain the code!
