# Stacking Sprites and destroy bottom all fall

**URL:** <https://forum.makecode.com/t/stacking-sprites-and-destroy-bottom-all-fall/11709>\
**Category:** Help\
**Created:** [January 13, 2022, 3:56am UTC](https://forum.makecode.com/t/stacking-sprites-and-destroy-bottom-all-fall/11709 "2022-01-13T03:56:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cdegaetano](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@cdegaetano](https://forum.makecode.com/u/cdegaetano)\
**Post date:** [January 13, 2022, 3:56am UTC](https://forum.makecode.com/t/stacking-sprites-and-destroy-bottom-all-fall/11709/1 "2022-01-13T03:56:58Z")

</div>

I am creating a chopping tree game. I have created 5 sprites staked on top of each other. When the ax hits the bottom one it is destroyed. I can’t get the 4 other to fall down to chop them. How do I have the other sprites fall? I am trying to stack like tetris blocks.  
Any help is appreciated.  
Here is what I have done:

> **[Timber](https://arcade.makecode.com/77524-16550-74056-74979)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![personalnote](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/personalnote/32/31359_2.png) [@personalnote](https://forum.makecode.com/u/personalnote)\
**Post date:** [January 13, 2022, 5:23pm UTC](https://forum.makecode.com/t/stacking-sprites-and-destroy-bottom-all-fall/11709/2 "2022-01-13T17:23:51Z")

</div>

add acceleration\_y to the sprites on game update.

---

<div class="post-metadata">

**Author:** ![cdegaetano](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@cdegaetano](https://forum.makecode.com/u/cdegaetano)\
**Post date:** [January 14, 2022, 5:14pm UTC](https://forum.makecode.com/t/stacking-sprites-and-destroy-bottom-all-fall/11709/3 "2022-01-14T17:14:54Z")

</div>

That only works on 2 blocks. 3 blocks stay in position. I don’t know how to change the y on blocks that already have been created.

---

<div class="post-metadata">

**Author:** ![personalnote](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/personalnote/32/31359_2.png) [@personalnote](https://forum.makecode.com/u/personalnote)\
**Post date:** [January 14, 2022, 10:53pm UTC](https://forum.makecode.com/t/stacking-sprites-and-destroy-bottom-all-fall/11709/4 "2022-01-14T22:53:04Z")

</div>

did you try using this way with a ‘for element value of array of sprites of kind’?

 ![Screenshot 2022-01-15 at 7.42.11 AM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/f/fc46191b35fea2137815b1e2660c60944f8ed52b.png)

---

<div class="post-metadata">

**Author:** ![cdegaetano](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@cdegaetano](https://forum.makecode.com/u/cdegaetano)\
**Post date:** [January 20, 2022, 6:26pm UTC](https://forum.makecode.com/t/stacking-sprites-and-destroy-bottom-all-fall/11709/5 "2022-01-20T18:26:09Z")

</div>

The only problem now is they all fall down at once. How do I stop them from falling until the bottom is removed?

---

<div class="post-metadata">

**Author:** ![personalnote](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/personalnote/32/31359_2.png) [@personalnote](https://forum.makecode.com/u/personalnote)\
**Post date:** [January 21, 2022, 12:20am UTC](https://forum.makecode.com/t/stacking-sprites-and-destroy-bottom-all-fall/11709/6 "2022-01-21T00:20:25Z")

</div>

> [@cdegaetano](#):
>
> [https://arcade.makecode.com/77524-16550-74056-74979](https://arcade.makecode.com/77524-16550-74056-74979)

I think you will have to create 5 individual sprites and sprite types and add accerlation\_y if the block below them is not overlapping or touching. Once you overlap with one, you will destroy that **one** individual sprite and sprite type. I tried messing around with your code and it seems that this is the only way I can see working.

---

<div class="post-metadata">

**Author:** ![cdegaetano](https://avatars.discourse-cdn.com/v4/letter/c/13edae/32.png) [@cdegaetano](https://forum.makecode.com/u/cdegaetano)\
**Post date:** [January 21, 2022, 5:21pm UTC](https://forum.makecode.com/t/stacking-sprites-and-destroy-bottom-all-fall/11709/7 "2022-01-21T17:21:40Z")

</div>

Thank for your help. That is what I was thinking.
