I’ve used player ID’s in 2 of my guides, and I think it is now time to make a guide on it.
Concept
Player ID’s are a way to numerically identify players. I have 2 types: iterative and unique. Iterative ones are a bit more “expensive” in that they use slightly more memory. This uses the order that the players joined to use player ID’s. It needs a closed spawn area to work properly. Iterative player ID’s can be used to go scroll or iterate through the entire server to see who to act on. However, unique player ID’s just gives each person a unique one. These don’t care about order. Now, these can be used for the computer to recognize players that have done actions to other players. Basically, iterative ones are for players to use, and unique ones are for the computer to recognize.
3 days later: Player ID’s are the most important concept for peaceful interactions. I can not stress this enough!
Implementations
Iterative
Make a lifecycle that listens for game start. It should broadcast on “Start Game Start” (since its only for the game host). Make a relay that relays to everyone when receiving on “Start Game Start”. It should broadcast on “Game Start”. Make a “Num Players” global scoped number property, with a default value of 0. Make a “Player ID” player-scoped number property, with no default. Make a trigger triggered when receiving on “Game Start”. In the blocks, it should increment “Num Players” by one, and set “Player ID” to “Num Players”.
Here is the trigger’s blocks:
Unique
Gimkit already has a type of unique ID: names. These are pretty versatile as ID’s, but they can’t do everything that number ID’s can do. I won’t show you how to make them because unique number ID’s are useless because of names and iterative player IDs.
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Off Topic:
Let’s go! I got TL2!
3n+1 is one of the most interesting sequences ever!