I need help giving each player a unique amount of an item

I am taking a unique approach to the voting system idea by giving each person a unique identifier that you can look at in the leaderboard. The problem is, that the Item Granter seems to be giving each player the same amount of the item.
(picture at bottom)
As you can see, I have a Lifecycle wired to a Relay that loops through all the players. The trigger increments the counter by 1, which also changes a property value that the Item Granter can access.
(The reason why I am using a trigger to increment the counter is because the Counter only has a “Target Value Reached” out condition)
From the Trigger, I run the Wire Pulse Block. Here is the code below:

It’s nothing fancy.

I have changed this about 10 times. (changing the item etc.)
If anyone could help me solve this, I would greatly appreciate this.

Is PlayerCount a numerical value?

Well to the discussions, discussions!


Why is it connected to a lifecycle? Also, welcome to this community!

yes it is and thank you

1 Like

the life cycle’s event is the game start event and ty

Hold on, the reason it is giving people the same amount is because there is nothing that changes it based on who you are. The only way to do that is if it is a free for all.

Could you please elaborate?

Ok, how are teams organized? Imposter vs all, right?

Precisely. A random player is chosen to be the impostor.

Welcome to the forum, @Discussions!

(wow, I’ve got to stop putting these parenthesis)

Wait, nevermind.

Wait, what is the playercount property?

it is the property that the item granter uses to grant the correct amount of items

The way I would set this up would be to have a player counter made, and store the number of players in a property C. Then have a relay (run when receiving on wire AND when receiving on channel S) pick a random player, and trigger an item granters code. It needs to first, increment property Y by one, grant them property Y items, and check if Y = C. If false, have the block transmit on channel S.


huh? I sort of understand however, what is channel S?

Is the property global? The scope should only be player.

Because I’m not in your head, I don’t know what you would name the channels. So I use placeholder names instead. They still work as channel names, but I don’t recommend it due to the names not showing what they do.

Which property?

the player count property is global. if it was player, everyone would be given 1 item.

Oh alright then. I understand