Items to Counter

Is there a system I can make to where the player can press a button, and it will transfer all of a specific item in the player’s inventory and transfer the exact number onto a counter. Block code is allowed, but not required.

Place a button, and make it so when you press a button, it goes to a trigger loop (or repeater) and after then make the repeater constantly do two things. Make it so it can stop on a channel called stop.

Make the repeater cool down as small as you can, then make it so it goes to a checker that checks for the item. If that have more than 0, and the check if successful, then make it go to an item granter that takes one of the item away. You can do -1 for that. Make it so it also makes a counter go up if the check if successful. After, when the check fails and they don’t have more than 0, make it stop the repeater.

Hopefully this helps! By the way, depending on how much of an item you have, it may take a while for it to transfer. Since I’m pretty sure the most you can get is 0.1, that’s only 10 items a second which may not suit your needs.

3 Likes

Is there a way to do it instantly. It is best if the item is transferred over instantly because the items can not fully transfer if the game ends.

If it helps, I have a scoreboard set to “specific item,” so you can use the “Get Player score” with blocks.

can’t do it instantly because of item giver give values can’t be changed.

you might be able to do it in a couple frames with trigger loops

All I really need is something to read how many of a specific item and add it to a counter. I don’t really care if they keep the items because they will be out of the zone they collect the items from.

ok, I’m like 87% sure this is possible, give it a little bit. someone might respond or I might think something up.

1 Like

The more I think about it, block code probably will be needed just to get the data needed for the counter.

Use an item tracker device

Ok, I see what your going for, and it may work. Is there a system that can get the number of items a player has and add that number to a counter?

(post deleted by author)

Do you need a counter? Because you can just make the inventory item manager update properties

Actually, I figured out that trigger loops can activate 20 times/sec. I though it would be like the repeater, which only can activate 2 times/sec. With that, I went with your solution, @Txme_Lxss!

A solution was marked and it’s been over three hours since any activity in the topic. This thread was manually closed by a leader since the closing timer system currently isn’t working, so apologies for any delay.