Does anybody know how to do this?

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?

2 Likes

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.

1 Like

@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.

1 Like

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.

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