# Can anyone help me with my enemy ai?

**URL:** <https://forum.makecode.com/t/can-anyone-help-me-with-my-enemy-ai/43977>\
**Category:** Help\
**Tags:** game\
**Created:** [May 13, 2026, 5:36pm UTC](https://forum.makecode.com/t/can-anyone-help-me-with-my-enemy-ai/43977 "2026-05-13T17:36:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![KING](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/king/32/35663_2.png) [@KING](https://forum.makecode.com/u/KING)\
**Post date:** [May 13, 2026, 5:36pm UTC](https://forum.makecode.com/t/can-anyone-help-me-with-my-enemy-ai/43977/1 "2026-05-13T17:36:06Z")

</div>

im looking for an enemy ai that goes from left to right , but if there’s a wall, it turns the other way. can anyone help?

please help me,

-KING

---

<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:** [May 13, 2026, 5:37pm UTC](https://forum.makecode.com/t/can-anyone-help-me-with-my-enemy-ai/43977/2 "2026-05-13T17:37:48Z")

</div>

ah you want goombas:

> **[enemy-goomba](https://arcade.makecode.com/S23416-01490-40266-98631)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![KING](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/king/32/35663_2.png) [@KING](https://forum.makecode.com/u/KING)\
**Post date:** [May 13, 2026, 9:02pm UTC](https://forum.makecode.com/t/can-anyone-help-me-with-my-enemy-ai/43977/3 "2026-05-13T21:02:59Z")

</div>

thank you

---

<div class="post-metadata">

**Author:** ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)\
**Post date:** [May 13, 2026, 9:03pm UTC](https://forum.makecode.com/t/can-anyone-help-me-with-my-enemy-ai/43977/4 "2026-05-13T21:03:10Z")

</div>

ok WHY THE HECK IS THAT SO SATISFYING

---

<div class="post-metadata">

**Author:** ![NeverStopTheCoder](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/neverstopthecoder/32/21194_2.png) [@NeverStopTheCoder](https://forum.makecode.com/u/NeverStopTheCoder)\
**Post date:** [May 13, 2026, 9:03pm UTC](https://forum.makecode.com/t/can-anyone-help-me-with-my-enemy-ai/43977/5 "2026-05-13T21:03:12Z")

</div>

oh boy I been waiting for this I made a extension for this **[https://github.com/neverstopthecoder/moving-extension](https://github.com/neverstopthecoder/moving-extension)**

its not 100% what you want but it will make a sprite move left for so long and then right and then left and then right etc

---

<div class="post-metadata">

**Author:** ![Solek](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/solek/32/29692_2.png) [@Solek](https://forum.makecode.com/u/Solek)\
**Post date:** [May 14, 2026, 5:32pm UTC](https://forum.makecode.com/t/can-anyone-help-me-with-my-enemy-ai/43977/6 "2026-05-14T17:32:17Z")

</div>

Have a look at my code in my Aces Base game. my enemies turn when they hit a wall, but also when they reach the edge of a ledge
