Congratulations! This is my first guide!
(Didn’t spell it “guild” this time!) No @Kosm0-o, that one doesn’t count, sorry.
I am going to make an updated guide in few weeks. I am going on a trip, so my editing time will be over by then. The updated guide will include things that people have been asking for in Help with creating a leaderboard.
I made this for my map called [REDACTED]. I searched up how to make a leaderboard, but I wanted one that is flexible to the number of players that j0in. I couldn’t find one, so I made my own, and now I made this guide! This leaderboard system tracks the when you are knocked out and places you in order of the knockout. (e.g. If you are the last person, the game ends and you are place 1.)
Screenshot
WARNING: VERY PROPERTY HEAVY
What you need:
-
One property per player (e.g. If you have 15 players, you need 14 property’s.) [1]
-
A couple of triggers (This depends on how many players you want your game to support.)
-
End-Game Device
-
A player counter (See other guides)
-
A property for score, and another to check if the game is active. (Explained later)
TEAM SWITCHER REMOVED BECAUSE IT CAN BREAK THE SYSTEM
This is what it will look like when it is done:
Onward to step !
Step 1: Property's
Welcome to step . Hurray!
This step is all about setting up the property’s, so you don’t have to be ready for ANY code just yet.
First create a property for EACH player. Starting at the highest one. For example, my game, [REDACTED], has a max players of 15 before the leaderboard breaks. You are welcome to make it longer or shorter, depending on preference.
You do NOT need to create a property for the first place person. ^[This is because the first place person never gets knocked out.
Each of the place’s property’s should be a number property, not text or true-false. ALL of those property’s should start out as FALSE.
You have now completed all of those annoying number property’s! Here is a screenshot of what 15 looks like. [2]
Now we move on to the other property’s.
-
“Players” Property: This property is from a player counter. Make sure you have one!
-
“Score” Property: Make this a number property; make the default value 1; have the scope set to player.
-
“Game-Active” Property: Make this a True-False property; make the default value False.
Score:
Game-Active:
Congrats! You completed the property section! Please move on to step .
Step 2: Other devices (No code or triggers here!)
This will go fast, so let’s get this over with…
Place a lifecycle device down with the following settings:
-
This device will listen for the event, Player Knocked Out.
-
The channel it will receive on is “Player-Knocked-Out”.
Place a End Game device down with the following setting:
- The channel it will receive on is “End-Game”.
Do we really need a screenshot? I’ll put it in anyway…
Onto part !
Step 3: YOUR NIGHTMARE: THE CODE
Ok, I know it says:
But…
It’s not that hard, just a lot of repetition.
All of the triggers lead to one another, so make sure to put them in order!
Anyway, here are the screenshots!
ALL of the different if statements are a different trigger. If you try and fit it in one trigger, it reached the block limit.
So… I know it’s a lot. That’s why I’m going to explain it. First, the "Game-Active property checks if the game is active. This is here in case a player gets knocked out before the game actually starts. So, when it does start, set that property to “True.”
The numbered properties are there to make sure all the places don’t get taken twice. (e.g. there are two 5th place people.) The player properties are there to check if there are even that many players still playing on the map!
The trigger sets the numbered property to “True”, so the place doesn’t get picked again. It sets the players score to their place, because they got that place. (e.g. 15, 14, 13, 12, etc.) This repeats for each place. We can’t put all the code in one trigger. We have to spread it out because of the block limit.
You do that by putting a channel at the end of the trigger. The next trigger activates from that channel.
Done with part !
Now wire the lifecycle to a wire repeater. Have the delay be ONE UNO second. Wire the wire repeater to a teleporter to a “You Got Knocked Out” screen. You need to make this because then, they are knocked out. Don’t use a team switcher to spectators because it breaks it.
And you’re done! Achievement unlocked!
I have completed this and now my hands are tired of typing XD.
- 0/10
- 1/10
- 2/10
- 3/10
- 4/10
- 5/10
- 6/10
- 7/10
- 8/10
- 9/10
- 10/10