leaderboard high score

leaderboard high score

Sorry image not available (late addition to game)

Details

Kode wheel segment World Properties
Style Specialised
Modifiers player score, player rank, gamertag, gamerpic, at index
Primarily WHEN/DO Both
Pre-made brains that use it unknown

World Properties> leaderboard high score

Description

This tile allows you to display the position and score on the main leaderboard for the brain/character it is in. You need to have set up a leaderboard. If you have not already set one up, placing this tile in a brain will give you a creation prompt for a leaderboard. The default position for the score is above the characters head.

It displays the players position, gamertag pic, gamertag and score. You will have needed to set up to [post score] for your players score to show.

Example Code

WHEN [left trigger][pressed] DO [toggle][boolvar:display score]

WHEN [boolvar:display score] DO [display][leaderboard high score]

 

 

Modifiers

None specifically for this tile in the Modifier segment, however when paired with display it uses the display modifiers (position, opacity etc)

It has its own modifier segment: Leaderboard Modifiers

player score: The player score only. Use this just to display the score and no other info

player rank: The player position on the high score table. Use this to display just the rank.

gamertag: The player gamertag name. Use this to display the gamertag of the player. You can place this within other text so you can greet the player or have characters use the gamertag of the player instead of a character name.

gamerpic: The players gamerpic as seen on their Xbox/Microsoft Account

at index: Grabs the score data (position, gamerpic, gamertag, score) of a specified position on the leaderboard (normally used to show the number 1 position). To get a list of the top scores (up to top 10) you use a [for each of] loop

WHEN [for each of][10] DO

…WHEN DO [display][leaderboard high score][at index][current index][screen top center]

This will display from 10 – 1.  Add [hud stack up] to the end of the line to show 1-10

Other Uses

There is a premade brain for a designed leaderboard. Place this is in a logic cube. It will detect whether the player is dead and then show the leaderboard. You can change this to a button press easily by altering line 2.

In the example above we used a left trigger toggle to show the score. Make the boolean a global boolean. Remove the display code in your player brain. Change line 2 in you new leaderboard braincube to

WHEN [global][boolvar:display score]

Now the leaderboard will come up/or down in the display layer when you press the left trigger.

Comments are closed.

Website Powered by WordPress.com.

Up ↑

%d bloggers like this: