Figure out Leaderboards

EpicFlux

Active Member
Reaction score
5
Since they have added and renamed some stuff, I cannot get the leaderboard to work. I'm making a simple but fun zergling golem map for when market place launches but I'm missing a key component and that's the leaderboard to count kills. I realize in this editor we need a variable for this unlike Starcraft 1 but even then I can't get it to count. All it does is show the leader board and it's blank as can be.
 

Yoshii

New Member
Reaction score
74
Since they have added and renamed some stuff, I cannot get the leaderboard to work. I'm making a simple but fun zergling golem map for when market place launches but I'm missing a key component and that's the leaderboard to count kills. I realize in this editor we need a variable for this unlike Starcraft 1 but even then I can't get it to count. All it does is show the leader board and it's blank as can be.

Leaderboard
Events
Timer - Elapsed time is 0.1 Game Time seconds
Local Variables
Conditions
Actions
Leaderboard - Create a leaderboard with 2 columns and 2 rows, with the name "Leaderboard", and using (100%, 100%, 100%) color.
Variable - Set Leaderboard1 = (Last created leaderboard)
Leaderboard - Add player 1 to (Last created leaderboard)
Leaderboard - Set (Last created leaderboard) item text at column 1 and row 1 to "Player:"
Leaderboard - Set (Last created leaderboard) item text at column 1 and row 2 to (Name of player 1)
Leaderboard - Set (Last created leaderboard) item text at column 2 and row 1 to "Kill:"
Leaderboard - Set (Last created leaderboard) item text at column 2 and row 2 to (Text(HeroKill[0]))
Leaderboard - Show all leaderboards for (All players)

then create a variable array and put 0 as the starting value;

then when you want to update the board
LeaderboardUpate
Events
Timer - Every 1.0 seconds of Game Time
Local Variables
Conditions
Actions
Leaderboard - Set Leaderboard1 item text at column 2 and row 2 to (Text(HeroKill[0]))
of course you can make it only update if a unit dies like also; i made made to increase kill by 1 when i type test just for testing purpose


you will also need to create a variable of type leaderboard
result:http://img215.imageshack.us/img215/863/resulty.jpg
 

EpicFlux

Active Member
Reaction score
5
I figured all of that out except that it wont update my kills. Once I kill something it says 0 and wont increase. Everything is just like yours.

EDIT: Ok I got it working. Now do I need a new variable for each player or with just one Player_Kills integer array work for all players?
 

Yoshii

New Member
Reaction score
74
I figured all of that out except that it wont update my kills. Once I kill something it says 0 and wont increase. Everything is just like yours.

EDIT: Ok I got it working. Now do I need a new variable for each player or with just one Player_Kills integer array work for all players?

you just need one variable; example

Player_kill[0]=player1
player_kill[1]=player2 etc; thats why player_kill is an array variable:)
be warned tho that player start from 1 . while the array in the example start at 0 therefore using Player_kill[player number of owner of killing unit] or similar will start at 1 as there is no player 0 ; you can change it tho
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top