# Cats hate water

**URL:** <https://forum.makecode.com/t/cats-hate-water/2802>\
**Category:** Help\
**Created:** [July 16, 2020, 1:04pm UTC](https://forum.makecode.com/t/cats-hate-water/2802 "2020-07-16T13:04:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [July 16, 2020, 1:04pm UTC](https://forum.makecode.com/t/cats-hate-water/2802/1 "2020-07-16T13:04:54Z")

</div>

> **[cats hate water](https://arcade.makecode.com/72659-41275-26567-27545)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

I’m trying to make the water rise in this game. any idea how?  
I’ve tried using projectiles in water blocks but it doesn’t work

---

<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:** [July 16, 2020, 3:48pm UTC](https://forum.makecode.com/t/cats-hate-water/2802/2 "2020-07-16T15:48:42Z")

</div>

Here’s how I would do it:

1. Create a variable for the current tilemap row that has water (in your example, looks like row 49)
2. Add an `on game update interval` block to raise the water level
3. Inside of that game update, decrease the current row by 1 (to raise the water level by 1 row)
4. Use a for-index loop to loop over the entire _width_ of the tilemap and set each tile in the current row to be water

---

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [July 16, 2020, 4:28pm UTC](https://forum.makecode.com/t/cats-hate-water/2802/3 "2020-07-16T16:28:36Z")

</div>

This is what i got so far

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/7/77b50f66972e2ef1c6d18cc46d1b630d0e661c7f.jpeg)

---

<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:** [July 16, 2020, 4:42pm UTC](https://forum.makecode.com/t/cats-hate-water/2802/4 "2020-07-16T16:42:24Z")

</div>

You want to loop over the width instead of the height. So the upper bound should be 15 and not 49.

And it you look in the scene category, there is a “set (tile) at (location col row)” block. Inside that loop, the “index” will be the column and “water rising” will be the row.

---

<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:** [July 16, 2020, 4:48pm UTC](https://forum.makecode.com/t/cats-hate-water/2802/5 "2020-07-16T16:48:09Z")

</div>

p.s. if you right click on the workspace, there is a “Snapshot” option that will download a picture of your code.

---

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [July 16, 2020, 4:54pm UTC](https://forum.makecode.com/t/cats-hate-water/2802/6 "2020-07-16T16:54:46Z")

</div>

Thanks it work!
