# Help with destroying tiles

**URL:** <https://forum.makecode.com/t/help-with-destroying-tiles/7730>\
**Category:** Help\
**Created:** [April 30, 2021, 4:04pm UTC](https://forum.makecode.com/t/help-with-destroying-tiles/7730 "2021-04-30T16:04:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![somecodeandnstuff](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@somecodeandnstuff](https://forum.makecode.com/u/somecodeandnstuff)\
**Post date:** [April 30, 2021, 4:04pm UTC](https://forum.makecode.com/t/help-with-destroying-tiles/7730/1 "2021-04-30T16:04:25Z")

</div>

I have an action which sends the player downward at a high velocity. When used on top of a certain sprite and tile, I want it to remove the sprite, and the wall tile when hit at that high speed. This would make the floor look like it’s broken, and send the player through it.

Any help with this is appreciated!

---

<div class="post-metadata">

**Author:** ![WoodysWorkshop](https://avatars.discourse-cdn.com/v4/letter/w/ea666f/32.png) [@WoodysWorkshop](https://forum.makecode.com/u/WoodysWorkshop)\
**Post date:** [May 3, 2021, 6:11am UTC](https://forum.makecode.com/t/help-with-destroying-tiles/7730/2 "2021-05-03T06:11:31Z")

</div>

(Move with arrows; up to jump and then when you’re in the air, press down to slam down)

---

<div class="post-metadata">

**Author:** ![WoodysWorkshop](https://avatars.discourse-cdn.com/v4/letter/w/ea666f/32.png) [@WoodysWorkshop](https://forum.makecode.com/u/WoodysWorkshop)\
**Post date:** [May 3, 2021, 4:24pm UTC](https://forum.makecode.com/t/help-with-destroying-tiles/7730/3 "2021-05-03T16:24:59Z")

</div>

Hi!

This sounded lots of fun so I put this together for you 🙂

> **[Smashy Floor](https://arcade.makecode.com/30904-18738-77517-33187)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![somecodeandnstuff](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@somecodeandnstuff](https://forum.makecode.com/u/somecodeandnstuff)\
**Post date:** [May 5, 2021, 9:52pm UTC](https://forum.makecode.com/t/help-with-destroying-tiles/7730/4 "2021-05-05T21:52:47Z")

</div>

Hi, I just saw this! Thank you so much.

Luckily, I already have code for the slam itself, but the code to break the floor really helps!

---

<div class="post-metadata">

**Author:** ![somecodeandnstuff](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@somecodeandnstuff](https://forum.makecode.com/u/somecodeandnstuff)\
**Post date:** [May 5, 2021, 9:53pm UTC](https://forum.makecode.com/t/help-with-destroying-tiles/7730/5 "2021-05-05T21:53:07Z")

</div>

The only issue I’m still having now is that I need kind of tile to break, and a radius of them on the x axis (specifically 5 tiles – the one under the player, and two on either side). I’m pretty sure I can get the former working with an if/then statement, but the radius sounds more complicated.

---

<div class="post-metadata">

**Author:** ![WoodysWorkshop](https://avatars.discourse-cdn.com/v4/letter/w/ea666f/32.png) [@WoodysWorkshop](https://forum.makecode.com/u/WoodysWorkshop)\
**Post date:** [May 6, 2021, 5:18pm UTC](https://forum.makecode.com/t/help-with-destroying-tiles/7730/6 "2021-05-06T17:18:31Z")

</div>

This made me think 😃 I like little challenges like this as I’m doing similar stuff with Tiles for another project… I didn’t do it with a radius, instead, I did it with iterating through a list of the tiles.

> **[Smashy Floor V2](https://arcade.makecode.com/53062-15557-34549-46640)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

Here you go 🙂

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/3/345f785b29baf25ccd976a819458ce93d346ad97.png)

---

<div class="post-metadata">

**Author:** ![somecodeandnstuff](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@somecodeandnstuff](https://forum.makecode.com/u/somecodeandnstuff)\
**Post date:** [May 6, 2021, 6:28pm UTC](https://forum.makecode.com/t/help-with-destroying-tiles/7730/7 "2021-05-06T18:28:14Z")

</div>

Thank you again! I kind of had the idea to select the row under the player, but I had no idea how to actually do it. You’ve been a huge help!
