• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Leaderboards

Status
Not open for further replies.
Level 4
Joined
Jul 4, 2009
Messages
77
Many of the functions I was used to in WE are now different or gone when it comes to leaderboards.

Will anyone be making a Leaderboard trigger Tutorial? Because I would like to add a leaderboard to a map of mine Im converting from WE to GE, but the leaderboards missing because I cant figure out how to work it exactly as it was in WE.

I do see theyve made some of it easier, with the "Add Player" trigger however.

Also. Arrays seem to work differently in GE than they did in WE

When I make an integer in WE, an array size of one is enough to trak kills for all players.
So 'Kills[Owner of Kill Unit]' integer would track all the kills by all the players.

But in GE, the same array, Integer with an array size of 1 gives me overflow errors, because it can only seem to store one players values.

I was under the impression an array of 1, could hold the following information

Kills[X] = Y (where X is the players number)

So each player would have
Kills[1] = Y
Kills[2] = Y
Kills[3] = Y
Etc

But in GE it only catches

Kills[First player to kill] = X (and then any other player making a kill will not say 'overflow error'.)

Am I not understanding the new array system? Do I have to put 12 in the first array box to allow up to 12 different players values?
 
Level 2
Joined
May 15, 2008
Messages
22
You always have to set a max value for the arrays.
So, if you want that your integer should work for 12 players, set the array to 11 (starting with 0)
or 12(starting with 1), how you like it better.

It's important to know that the Galaxy Editor cheats you in this respect.

If you create a variable with an array of 4, it actually creates one with an array of 5!
The GUI doesn't count the 0th spot to make it easier for mapmakers to use stuff like Kills[TriggeringPlayer()] without getting overflows.

So if you set the array to 11, but want to use all 12 slots you have to substract 1 from the player number, or else it'll overflow.
 
Status
Not open for further replies.
Top