G’day! This guide will teach you how to add a system to your game to track how many blocks you have broken will inventory item managers and properties!
Now don’t go yelling at me in the comments yes there are other ways to do this but this is the way I found.
Limits
Whenever you break a block but you don’t have enough inventory space, the counter will not go up.
If a block is granted into your inventory the counter will go up
This says that whenever the amount of dirt in the player’s inventory changes, it adds one dirt miner. Plus, you could just use a counter and a property that broadcasts on that channel. I’m not sure this guide works if you drop your minerals and pick them back up repeatedly.
Nice guide, but easier solutions following getrithekd’s post:
Case 1: players can’t sell/use minerals
The inventory manager updates a property that is the score.
Case 2: players can sell/use minerals
At the sell station, whenever a player sells/uses a certain amount of dirt, that certain amount is added to the property that is the player’s score.
Case 3: a small fix, perhaps?
Using this guide, add to the blocks in the inventory manager to also send on channel “remove blocks”.
An item granter grants -1 minerals when receiving on this channel.
This will prevent the player from dropping and picking up blocks to cheat.
(But will prevent them from building, which you can fix by providing a type of block that does not count towards the score.)
basic explaination:
Use this guide but add a feature that removes all the player’s blocks, so they will never have blocks they can drop from their inventory.
The block code and devices for that is a bit complicated for new users, so I get why it’s a bit difficult to understand.