# Range problem

**URL:** <https://forum.makecode.com/t/range-problem/39968>\
**Category:** Help\
**Created:** [October 25, 2025, 5:47pm UTC](https://forum.makecode.com/t/range-problem/39968 "2025-10-25T17:47:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leosigma](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/leosigma/32/25072_2.png) [@Leosigma](https://forum.makecode.com/u/Leosigma)\
**Post date:** [October 25, 2025, 5:47pm UTC](https://forum.makecode.com/t/range-problem/39968/1 "2025-10-25T17:47:50Z")

</div>

How to make the mouse make a sound when it is close to the monster, and stop when it is out of range. [https://arcade.makecode.com/S18088-97796-48977-54508](https://arcade.makecode.com/S18088-97796-48977-54508)😊

---

<div class="post-metadata">

**Author:** ![not\_a\_lemon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/not_a_lemon/32/35289_2.png) [@not\_a\_lemon](https://forum.makecode.com/u/not_a_lemon)\
**Post date:** [October 25, 2025, 6:14pm UTC](https://forum.makecode.com/t/range-problem/39968/2 "2025-10-25T18:14:13Z")

</div>

In a game update use a for element value loop and then you can use the proximity Boolean in my extension here:

> **[GitHub - EugeneRedwing8/arcade-sprite-basics: A MakeCode project](https://github.com/eugeneredwing8/arcade-sprite-basics)**
>
> A MakeCode project

---

<div class="post-metadata">

**Author:** ![TheEarth](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/theearth/32/34579_2.png) [@TheEarth](https://forum.makecode.com/u/TheEarth)\
**Post date:** [October 27, 2025, 4:15am UTC](https://forum.makecode.com/t/range-problem/39968/3 "2025-10-27T04:15:07Z")

</div>

or you could use jwunderl/arcade-sprite-utils
