So, I have a inventory array set up for my game that would add 1 to your block counter in your inventory every block you break, only problem is I don’t understand how to do this for I don’t use arrays very often.
2 Likes
To solve this problem, I made a new function called ‘CollectItem’ that is called every time the player should collect an item. It takes the name of the item as an input.
The function simply checks if any of the items in the inventory have the same name as the item we’re collecting, and if it does, it adds 1 to the tooltip value.
And on a side note, this game is REALLY REALLY COOL!! I ADORE how much detail you’ve put already into the gameplay and art, it’s clear there’s a ton of content here. As a bonus, you organized this code really well, so it was quite easy to understand your code and work out a solution.
Please update me if you ever release this game!

3 Likes
Thank you! It is a MakeCode Arcade Recreation of a game me and a friend are actively about to release a demo of this Halloween! This is just a passion project to pass some time and get some ideas.