In this short guide, I will teach you how to make a level-up system, similar to @Coral’s guide, but a little more advanced and more reliable.
Start off by placing down KNOCKOUT MANAGER and set WHEN TARGET KNOCKED OUT, TRANSMIT ON to KNOCKOUT. Copy the KNOCKOUT MANAGER and KNOCKOUT TARGET to SENTRY. Place down a trigger and copy this: TRIGGER BY PLAYER COLLISION = NO VISIBLE IN-GAME = NO TRIGGER WHEN RECEIVING ON = KNOCKOUT
Go to block on the left side of your screen and create block block for WHEN TRIGGERED…. Do what I do:
Set Property "XP"
Value <Get Property "XP" + 10>
if <Get Property "XP" ≥ <<Get Property "LVL" × 10> - 1>
do Set Property "LVL"
Value <Get Property "LVL" + 1>
Set Property "XP"
Value 0
Broadcast Message On Channel "ChangeStats"
Note: Make sure the BROADCAST MESSAGE ON CHANNEL block is OUTSIDE of the IF, DO block.
After you’re done with that, place down a property and copy me: PROPERTY NAME = XP PROPERTY TYPE = NUMBER PROPERTY SCOPE = PLAYER
Copy that and change PROPERTY NAME to LVL and DEFAULT VALUE to 1 The rest of the guide is optional.
Now that you’re done with the mechanic, don’t you want your players to see their level? Well, place down a game overlay and copy me: OVERLAY POSITION = TOP RIGHT OVERLAY TEXT = XP: 0/10, LVL: 1 CONTENT SCOPE = PLAYER
Create a block for WHEN RECEIVING ON CHANEL… set CHANEL NAME to LVLUP and copy me:
Set Text create text with "XP: "
Get Property "XP"
"/"
<Get Property "LVL" × 10>
", LVL: "
Get Property "LVL"
Um, hi! I’m not really sure if this is allowed, but couldn’t you have told me in the replies if my original post? Did you have an error? If so, please let me know in the original post! Or what else you needed, thanks -coral
I think I did something wrong with the preformatted text. Also, is there a way to fetch all player usernames without having them press a button at the beginning of the game. I’m thinking of a hidden zone/trigger.