Welcome one and all!
In this guide, weâll be looking over how you can make players swap their scores randomly! This can be a great way to spice up your map. This guide will cover all 3 forms of scores, starting with items, then properties, then knockouts! By the end, you should have a system that when doing an input, like pushing a button or purchasing from a vending machine, playerâs scores should shift around!
Final Product
Final Product
In this gif on the left side of the screen, you can see me pressing a button with 2 test dummies off to the side. On the right side, you can see the leaderboard and how the scores shift around.
Materials
This list is sorted first by the greatest number of devices to the least, then by how much memory they use.
âPropertyâ Ă4 (40 memory)
âRelayâ Ă3 (60 memory)
âItem Granterâ Ă1 (1,535 memory)
âLifecycleâ Ă1 (50 memory)
âButtonâ Ă1 (50 memory)
âTriggerâ Ă1 (40 memory)
âCounterâ Ă1 (25 memory)
âWireâ Ă1 (10 memory) [1]
Total memory: 1,810
Glad youâve decided to check this out! Without further ado, letâs start!
The Live Player Counter
The Live Player Counter
For this system to work, weâll need a live player counter. Since most other guides lack detail or are no longer functional, hereâs my take!
First, youâll need a âLifecycleâ device with these settings:
Event:
Game Start
When event occurs, transmit on:Game started
Now, youâll need a âTriggerâ device. This will be used to update the player count every couple game ticks. DO NOT USE REPEATERS, PLEASE!!! Set it up like this:
When triggered, transmit on:
Reset
Trigger when receiving on:Game started,Reset
Trigger Delay:0.1
Visible In-Game:No
Allowed Team:Any Team
Max Triggers:
Active On Game Start:Yes
Activate when receiving on:
Deactivate when receiving on:
Active Scope:global
Trigger By Player Collision:No
Next, youâll need a âRelayâ device. This will be used to send out a message to all players making sure they are accounted for.
Relay Audience:
All Players
Relay channel:Count player
Relay when receiving on:
Now youâll need a âPropertyâ device. This will be used to store how many players are in the game.
Property Name:
Players
Property Type:Number
Default Value:0
Property Scope:global
When property value changes, transmit on:
Broadcast value change on game start:No
Next youâll need a âCounterâ device. This will be used to set the âPlayersâ property.
Starting Value:
0
Increment counter when receiving on:Count player
Decrement counter when receiving on:
Visible In-Game:YesâTurned on for playtesting purposes. Set toNoafter testing.
Count Scope:global
Reset counter when receiving on:Reset
Update Property:Yes
Property To Update:Players
Use Target Value:No
The final step is wiring the âTriggerâ device to the âRelayâ device. This will broadcast to other players, while giving the âCounterâ device time to reset.
Trigger â When this event occurs:
Triggeredâ Relay â Run this action:Trigger relay
Youâve finished your player counter! Make sure everything is working correctly. When you start the game, the âCounterâ device should show how many players are currently in the game.
Swapping the Scores
Swapping the Scores
Before we continue, let me quickly address that this system is going to be set up for scores that track items. I will show you how to make this system work for properties and knockouts further into the guide.
Now that we know how many players there are, letâs swap their scores!
Letâs add in all of the needed âPropertyâ devices first.
Property Name:
Swapper
Property Type:Text
Default Value:
Property Scope:global
When property value changes, transmit on:
Broadcast value change on game start:No
Property Name:
Swapped players
Property Type:Text
Default Value:
Property Scope:global
When property value changes, transmit on:
Broadcast value change on game start:No
Property Name:
Swap score
Property Type:Number
Default Value:0
Property Scope:global
When property value changes, transmit on:
Broadcast value change on game start:No
Letâs break down what these âPropertyâ devices are doing. The âSwapperâ property is going to hold the ID of the person who initiated the scores to be swapped. This will be used to make sure their score is swapped last and scores are swapped correctly. The âSwapped playersâ property will be used to hold the IDs of all the players that have had their score swapped, so the same player isnât chosen twice. The âSwap scoreâ property will hold the score of the previous player that had their score swapped to give to the next person.
Now that the properties are in place, we can get to the fun stuff! Weâll need a way to engage the swap. Iâll be using a button, but you can use any system you want, like a vending machine for example. Hereâs how the button will be set up:
Button Message:
Swap scores!
When button pressed, transmit on:Swap scores
Visible In-Game:Yes
Interaction Duration:1 Second
Active On Game Start:Yes
Activate when receiving on:
Deactivate when receiving on:
Active Scope:global
Next youâll need a âRelayâ device. This will choose a player at random to swap scores with.
Relay Audience:
Random Player
Relay channel:Swap
Relay when receiving on:Swap random
Now get another âRelayâ device. This one will be used to give the person who initiated the swap their new score.
Relay Audience:
All Players
Relay channel:Swap finish
Relay when receiving on:Swap finish relay
The final steps involve the âItem Granterâ device and will be used for holding the code. Most of the settings can be changed to your preference, but if youâre just following along, set it up like this:
Item To Grant:
CashâChange to the item youâre game scores.
Amount To Grant:1
Grant item when receiving on:
Grant Strategy:Overflow
Replace When Full:No
Initial Gadget Projectiles:
This âItem Granterâ will have 3 blocks. This first one is used to initiate the swap:
Create a new block â When receiving on channel:
Swap scoresSet Property: "Swap score" Value: Triggering Player's Score Set Property: "Swapped players" Value: Triggering Player's ID Set Property: "Swapper" Value: Triggering Player's ID Broadcast Message On Channel: "Swap random"
The next block will be used to swap all of the scores.
Create a new block â When receiving on channel:
Swapif: (in text: Get Property: "Swapped players" find (first) occurrence of text: Triggering Player's ID) = (0) do: set (Swap) to: Get Property: "Swap score" Set Property: "Swap score" Value: Triggering Player's Score Grant Player Selected Item (Custom Amount) Amount: Triggering Player's Score Ă -1 Grant Player Selected Item (Custom Amount) Amount: (Swap) Set Property: "Swapped players" Value: create text with: Get Property: "Swapped players", Triggering Player's ID if: (length of: Get Property: "Swapped players" Ă· 24) â (Get Property: "Players") do: Broadcast message on channel: "Swap random" else: Broadcast message on channel: "Swap finish relay"
The final block is to give the player that initiated the swap their new score.
Create a new block â When receiving on channel:
Swap finishif: (Triggering Player's ID) = (Get Property: "Swapper") do: Grant Player Selected Item (Custom Amount) Amount: Triggering Player's Score Ă -1 Grant Player Selected Item (Custom Amount) Amount: Get Property: "Swap score"
Step-By-Step Breakdown
Step-By-Step Breakdown
Okay, so this is cool and all, but how does it work? First, the swap has to be initiated. I used a button to do this, but feel free to change it, just make sure that your system broadcasts on the Swap scores channel. When initiated, the first block of the âItem Granterâ device runs. It sets the âSwap scoreâ property to our score. This is so the score can be passed on to the next person. Then it sets the âSwapped playersâ property to their unique ID. This is to ensure that they are not the randomly selected player. Then it sets the âSwapperâ property to their unique ID as well. This will be used to find the person who initiated the swap once every other playerâs score has been swapped. Finally, it broadcasts on the Swap random channel.
A âRelayâ device receives this message and broadcasts on the Swap channel to a random player. The âItem Granterâ also receives this message and runs another block. First, the block makes sure that the player that was randomly selected hasnât been selected already. It checks this by seeing if the playerâs unique ID is found in the âSwapped playersâ property. If itâs not, then it swaps their score with the previous playerâs score. It sets the âSwapâ variable to the âSwap scoreâ property to make sure it is not lost in the process. It then sets the âSwap scoreâ property to their current score that will be passed on to the next player. Then it removes all of the item that counts as the score from their inventory, and grants them their new swapped amount using the âSwapâ variable. Finally, the players unique ID is appended to the end of the âSwapped playersâ property since their score has now been swapped. After the score has been swapped or the player has been skipped over, then it checks to see if the system has gone through every player. It does this by dividing the length of the âSwapped playersâ property by 24. Since each playerâs unique ID is 24 characters long, dividing the length of the property by 24 allows us to see how many players have already been swapped. If that number is not equal to the amount of players that are currently in the game found by using the âPlayersâ property from the live player counter, then the loop must continue until all players have been swapped. The block broadcasts on the Swap random channel to keep the loop going. If all players have been swapped however, it broadcasts on the Swap finish relay channel.
The Swap finish relay channel completes the last swap between the player that initiated the swap and the player that was last swapped. While making this system, I discovered that if the player that began the swap wasnât picked as the last player, their score would be used to swap twice. [2] To fix this, I made this system. A âRelayâ device receives the Swap finish relay broadcast, and sends the Swap finish broadcast to all players. This will ensure that the person who initiated the swap receives the message. Once a player receives the message, the block in the âItem Granterâ device that receives on Swap finish is ran. It checks if the player is actually the person who initiated the swap using the âSwapperâ property. Hint: this property isnât actually needed. See if you can find a way to remove it while keeping the system functioning correctly! If they are not the person who started the swap, the block isnât ran. If they are, then it removes all of the score item that they currently have and adds their new score!
With that, youâve finished! See if it works by getting some friends to join, or opening the game in separate tabs. When the button is pressed, you should see in the leaderboard the scores for every player being changed.
Changing the Score Type
Changing the Score Type
If your game uses properties to score, youâll need to change a bit of the code to fit your system. If youâre using a âPropertyâ device to score your game, be sure that you are NOT using a âCounterâ device to set the property. Using block code will ensure there are no issues with scoring. If youâre wanting to change the score type from item to property or if youâre wanting to set up your score type for knockouts, follow along. If you already have a scoring system for properties, skip ahead to the code.
You will need 1 extra âPropertyâ device costing 10 memory, another block in the âItem Granterâ device costing 500 memory and a âButtonâ device or some other way to add to the score costing 50 memory. This brings the total memory up to 2,370.
Set up the âPropertyâ device for the score like so:
Property Name:
My scoreâChange to what you like
Property Type:Number
Default Value:0
Property Scope:player
When property value changes, transmit on:
Broadcast value change on game start:No
Set the Score Type in the Map Options to Property and set the Score Property to the property you just created.
Settings â Map Options â Score â Score Type:
Property
Settings â Map Options â Score â Score Property:My score
Add the button and give it these settings:
Button Message:
Increase score
When button pressed, transmit on:Increase score
Visible In-Game:Yes
Interaction Duration:1 Second
Active On Game Start:Yes
Activate when receiving on:
Deactivate when receiving on:
Active Scope:global
Then add a block to the âItem Granterâ device. This will be used to increase the score by 1 every time the button is pressed.
Create a new block â When receiving on channel:
Increase score
Now weâre going to modify some of the code in the âSwapâ and âSwap finishâ blocks.
Edit an existing block â When receiving on channel:
Swapif: (in text: Get Property: "Swapped players" find (first) occurrence of text: Triggering Player's ID) = (0) do: set (Swap) to: Get Property: "Swap score" Set Property: "Swap score" Value: Triggering Player's Score Set Property: "My score" Value: (Swap) Set Property: "Swapped players" Value: create text with: Get Property: "Swapped players", Triggering Player's ID if: (length of: Get Property: "Swapped players" Ă· 24) â (Get Property: "Players") do: Broadcast message on channel: "Swap random" else: Broadcast message on channel: "Swap finish relay"Edit an existing block â When receiving on channel:
Swap finishif: (Triggering Player's ID) = (Get Property: "Swapper") do: Set Property: "My score" Value: Get Property: "Swap score"
Now your system can function with properties!
Want your system to work with knockouts? All you need to do is increase the score when you get a knockout instead of pressing a button. Remove the âButtonâ device, and add a âLifecycleâ device and give it these settings:
Event:Player Knocks Out
When event occurs, transmit on:Increase score
And itâs that simple!
Great job on making your own score swapping system! I hope you learned something today! These guides take a long time to make and format, so leave a heart if you liked it! Thanks for reading, and Iâll see you in the next one!
Mini-Guide on Making Good Guides
Mini-Guide on Making Good Guides
Iâve seen a lot of guides lately that have been lackluster, difficult to follow, or just downright bad. I hope this will shed some light on the situation and others may learn from it.
My suggestions
When setting up a guide, always give background information. The title is a great summary of what the system is about, but you should ensure that readers know exactly what they are going to make before they begin. Example: instead of saying, âIn this guide, we will make a camera,â elaborate and give more detail and say, âIn this guide, we will be making a camera system using camera points and a basic menu system using Game Overlays.â I also like to give visual aide to what the guide actually makes using a .gif file. I make these by recording the shortest video I possibly can, uploading it to Canva, trimming and speeding up the video, and downloading it as a .gif in the smallest possible size. There are definitely other options out there, but theyâre all blocked for me. ![]()
Readers need to know how much memory is going to be used when following a guide, or at least a close estimate. If they already have too much memory taken up in their map, they might not be able to afford your system. Add a list of everything needed for the guide to function, the memory it will take and any notes for customization. For example, using the camera guide example from before, âYou will need 3 camera points. Each camera point takes 100 memory. The amount of camera points you use may vary depending on how many cameras you want on your map.â
Make sure progression is smooth. Generally speaking, your guide should progress from cause to effect, meaning after A happens, B happens. For example, âWhen the button is pressed, activate camera point 1, activate ânextâ overlay, activate âpreviousâ overlay, activate âcloseâ overlay. When ânextâ overlay pressed, activate next camera point, deactivate previous camera point. When âpreviousâ overlay pressed, activate previous camera point, deactivate next camera point. When âcloseâ overlay pressed, deactivate all camera points, deactivate ânextâ overlay, deactivate âpreviousâ overlay, deactivate âcloseâ overlay.â
Split the system into manageable steps. Readers need to feel that they have made progress to keep them engaged. Try not to overload the reader with 1 continuous blob of settings and code. When splitting up the example for a camera guide for example, I might split it into 3 sections, âSetting Up Camera Points,â âOpening The Cameras,â and, âSwitching Cameras.â
Donât just tell readers what to make. Tell them how it works! Readers will never learn anything if theyâre blindly following you, and they wonât know what to do if it ends up not working right. Similarly, be sure readers will be able to understand what youâre saying. This can be accomplished by using basic grammar. For example, using the camera system, donât say âDo camera, then button here.â Instead say, âPlace down a Camera Point device anywhere you like. Choose where you want your camera to be opened and place a button there.â I strongly suggest downloading the Grammarly extension to help you with writing guides. My school recently blocked it and I can no longer use it, but it has helped me write so many of my guides. You donât need Pro either, the normal extension works perfectly fine.
Use polls, and donât turn down the opportunity to improve yourself. Listen to feedback, donât write, âplz dont be mean or flag i new here.
â Also, if youâre asking yourself, âWill I get flagged for this?â chances are the answer is yes. Another thing, if youâre providing feedback, please be constructive. Include something that you think the writer did good, then provide feedback politely and descriptively.
Keep readers engaged, however, focus on delivering information effectively. Iâve seen a lot of people use alter-egos on their guides. Itâs funny, but it usually takes away from the actual information and makes the guide difficult to follow. If youâre wanting to do something like that, please donât use it every other sentence. Itâs perfectly okay to make a joke every now and then, but doing so excessively can take away from the overall purpose of the guide.
How I Format
I try to be unique with the way I format my guides. One thing that I think every guide should use is dropdowns to keep things clean and organized. Another thing I do that seems to be unique to me is instead of just using images of device settings and blocks, I include a written version as well. I do this for 2 reasons. One, in case Josh decides to remove all images again, the guide will still be usable. Two, it allows me to easily mark things that can be changed.
When taking a screenshot of a device, I like to include all of the settings in one picture. To do this, I open the All Options section of the device if there is one, then I zoom out by pressing â - (Ctrl - on Windows) until all of the settings fit in the window. I do this for blocks as well, zooming out until the code fits in the window.
I still havenât fully decided on a way to write code, but hereâs what I used in this guide. I marked text with quotations (" "), inputs with colons ( : ), operator groups and variables with parentheses [( )] and text groups with commas (,). Iâm still sort of figuring this out, but Iâm sure a straightforward system will come to me eventually.
I use bold text to show important information. Pretty simple, yet effective. It tells readers to pay attention to certain key details they may miss. I also use <mark>Customize</mark> to indicate opportunities for readers to make the system their own.
I also like to add my own touch to my guides that makes them stand out. One thing I do is put device names in quotation marks. Not necessary for the guide to make sense but it makes me feel smarter.
Other things I do are the easter egg, and Make It Your Ownâ:trade_mark: section (which is not here this guide, because itâs pretty small).
Thanks for reading this additional mini-guide, and I hope you found it helpful!
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
This is the first time Iâve used a wire since I learned about channel stacking lol â©ïž
You found the Easter Egg!
What should you do? Reply to this guide saying how much you love (or hate) this guide and put an egg emoji at the end of your reply! Be sure to add some constructive feedback so you donât get flagged! â©ïž




























