# Does anybody know how to do this?

**URL:** https://forum.makecode.com/t/does-anybody-know-how-to-do-this/40516
**Category:** Help
**Created:** [November 17, 2025, 6:52pm UTC](https://forum.makecode.com/t/does-anybody-know-how-to-do-this/40516 "2025-11-17T18:52:32Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![AGuyThatsBored](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/aguythatsbored/32/30384_2.png) [@AGuyThatsBored](https://forum.makecode.com/u/AGuyThatsBored)
#### Post date: [November 17, 2025, 6:52pm UTC](https://forum.makecode.com/t/does-anybody-know-how-to-do-this/40516/1 "2025-11-17T18:52:32Z")

</div>

in my game, Moonman, i cant figure out how to make a good system to collect rocks on the moon. Does anybody know how to do that?

> **[Moon Man](https://arcade.makecode.com/S80221-68100-49921-85144)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

### Author: ![nuhuhhuuh](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/nuhuhhuuh/32/25851_2.png) [@nuhuhhuuh](https://forum.makecode.com/u/nuhuhhuuh)
#### Post date: [November 18, 2025, 5:51pm UTC](https://forum.makecode.com/t/does-anybody-know-how-to-do-this/40516/2 "2025-11-18T17:51:34Z")

</div>

I suggest making the rocks food and also make a variable called “rocks,” and when you overlap, you can change it by one. Or you can just do it with the score variable instead in the info section.

---

<div class="post-metadata">

### Author: ![AGuyThatsBored](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/aguythatsbored/32/30384_2.png) [@AGuyThatsBored](https://forum.makecode.com/u/AGuyThatsBored)
#### Post date: [November 18, 2025, 9:38pm UTC](https://forum.makecode.com/t/does-anybody-know-how-to-do-this/40516/3 "2025-11-18T21:38:54Z")

</div>

@nuhuhhuuh the problem is getting it to activate, not the actual rock storage. The suggestion for score is good, but i plan on making multiple materials, so it wouldn’t work. Thanks though.

---

<div class="post-metadata">

### Author: ![Iro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/iro/32/34749_2.png) [@Iro](https://forum.makecode.com/u/Iro)
#### Post date: [November 20, 2025, 4:34pm UTC](https://forum.makecode.com/t/does-anybody-know-how-to-do-this/40516/4 "2025-11-20T16:34:56Z")

</div>

Ooooo this is a good one. okay so what you gotta do is (btw this isn’t the most efficient way, so) make a var for each mat. then you have multiple vars for each sprite (or figure out how to do that in an array) then on overlap, check if a button is pressed, then if yes, destroy the sprite there, then add one to the var that tracks the items.

---

<div class="post-metadata">

### Author: ![AGuyThatsBored](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/aguythatsbored/32/30384_2.png) [@AGuyThatsBored](https://forum.makecode.com/u/AGuyThatsBored)
#### Post date: [November 24, 2025, 5:18pm UTC](https://forum.makecode.com/t/does-anybody-know-how-to-do-this/40516/5 "2025-11-24T17:18:12Z")

</div>

Again, storage isn’t the problem, its getting it to activate while also having the collect button. Thanks though.
