# NOT touching a kind

**URL:** <https://forum.makecode.com/t/not-touching-a-kind/6581>\
**Category:** Help\
**Created:** [March 5, 2021, 3:53pm UTC](https://forum.makecode.com/t/not-touching-a-kind/6581 "2021-03-05T15:53:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![salieri](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/salieri/32/7275_2.png) [@salieri](https://forum.makecode.com/u/salieri)\
**Post date:** [March 5, 2021, 3:53pm UTC](https://forum.makecode.com/t/not-touching-a-kind/6581/1 "2021-03-05T15:53:21Z")

</div>

Hello everyone!

I am making a dinosaur game where you walk around and stomp buildings. The city is randomly generated, part of which I throw water sprites down. I want the player/monster to slow down while touching the water sprites.

I can easily set my variable of playerSpeed to whatever I want when it overlaps with the correct _kind_, but I can’t figure out how to speed it back to normal when it isn’t touching anymore.

I found the “mysprite overlaps with othersprite” block that I can put into an if/else and that works but only for one of the water sprites generated (I’m guessing the first or the last?) so I seem to need to work with the “overlaps with kind” blocks.

Here is my project. Sorry if it is a mess. [https://makecode.com/\_FD8WVu4UDR6t](https://makecode.com/_FD8WVu4UDR6t)

---

<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 5, 2021, 5:21pm UTC](https://forum.makecode.com/t/not-touching-a-kind/6581/2 "2021-03-05T17:21:04Z")

</div>

You need to put the check into a for array of all sprites kind and replace othersprite with value. otherwise it will only check the last one created. Here is the fix implemented. The array of sprites kind block is under the sprites tab.

> **[Monster Smasher (FIX)](https://arcade.makecode.com/70879-76735-79618-17644)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![NxNMatrixGL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/nxnmatrixgl/32/2553_2.png) [@NxNMatrixGL](https://forum.makecode.com/u/NxNMatrixGL)\
**Post date:** [March 5, 2021, 10:21pm UTC](https://forum.makecode.com/t/not-touching-a-kind/6581/3 "2021-03-05T22:21:11Z")

</div>

Fun game! Great job!

---

<div class="post-metadata">

**Author:** ![salieri](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/salieri/32/7275_2.png) [@salieri](https://forum.makecode.com/u/salieri)\
**Post date:** [March 8, 2021, 8:38pm UTC](https://forum.makecode.com/t/not-touching-a-kind/6581/4 "2021-03-08T20:38:35Z")

</div>

Thank you for your help. I totally get what is going on in the example fix you posted for me. However, it doesn’t seem to work. The dino doesn’t speed back up to 50. It looks like it should. /puzzle
