• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

My Leaderboard

Status
Not open for further replies.
Level 3
Joined
Apr 7, 2012
Messages
25
This is what I have so far of my leaderboard which works perfectly.

leaderboard.gif


What I need in a second trigger is too Track the worlds that each player conquers.

This link http://www.stardepot.org/13/leaderboards/

is the leaderboard i am copying from to use and I was able to use the first part getting the leaderboard to show up but the second part is about tracking kills, but I don't need that I need tracking the ownership of worlds.

So, if anyone could work that out, +rep to you!

Okay this is what I am tempting, I am trying to get the leaderboard to update for "Any unit" enters the entire map.

This is what I have as next trigger


Event Unit - Any Unit Enters (Entire map)


Actions Leaderboard - Set MainLeaderBoard item text at column 2 and row (Owner of (Last created unit)) to (Text(Worlds[(Owner of (Last created unit))]))
Variable - Modify Worlds[(Owner of (Triggering unit))]: + 1

I start map and I am getting an error something to do with the Player Array

Quick update,

Event Unit - Any Unit Enters (Entire map)


Actions Leaderboard - Set MainLeaderBoard item text at column 2 and row (Owner of (Triggering Unit)) to (Text(Worlds[(Owner of (Last created unit))]))
Variable - Modify Worlds[(Owner of (Triggering unit))]: + 1

I was told by someone that I should instead do it like this and it should update my leaderboard, but instead when tested I still get this Player Array error.
 
Last edited by a moderator:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Well I cannot help you with the error until you give me the exact text or the map so I can debug the error personally. As a rough guess your array is too small (should be size 16).

I do not think the event is correct as that fires only when units are created and first appear on the map. If a player takes over a planet it will not fire.

How I would do it is by writing a function that takes a player and updates their planet leaderboard entry. I would keep track of planets in an array and every time an planet is gained increment it by one and every time a planet is lost decrement it by 1. When it reaches 0 it might be a good idea to defeat the player.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
After some fidgeting I discovered the proper way to create a board using automatic player mapping.

Steps to create a board (Leaderboard in GUI).
1. Create a board.
2. Set board headers.
3. Set automatic player column
4. Add players and fill their value columns (the row specifies the player to map the value to offset by so that Neurtal is 1 and the first player is 2).

It is important that you do not swap step 2 and 3 as you cannot add headers once the automatic player column has been specified.

I am working to solve the problem in this topic privately.
 
Status
Not open for further replies.
Top