Leaderboard....ugh

Status
Not open for further replies.

i_killa_you

BattleForums Junior Member
Joined
Oct 14, 2003
Messages
182
Reaction score
0
I spent days trying to make a leaderboard for my hero arena, I opened other maps, searched the web, and even tried to make one myself..which didn't turn out good. If possible can someone show me how to do a complete leaderboard? I want this leaderboard to display the names of the players as well as the colors, and I also want it to count the number of enemy hero kills you get.

Any help is greatly appreciated.
 

ChrisH36

Guy with Most Posts on Quiet Board.
Joined
May 20, 2003
Messages
15,042
Reaction score
4
Location
Temple Prime, Sarajevo
For enemy hero kills, make a variable that goes up by 1 each time a hero type unit dies.
 

i_killa_you

BattleForums Junior Member
Joined
Oct 14, 2003
Messages
182
Reaction score
0
You see, thats the thing, I have no knowledge of variables. That is why I am having so much trouble..
 

ChrisH36

Guy with Most Posts on Quiet Board.
Joined
May 20, 2003
Messages
15,042
Reaction score
4
Location
Temple Prime, Sarajevo
When I get home and write my crib sheet for my INT test, I'll get on World Editor and help you out of your little "jam".
 

i_killa_you

BattleForums Junior Member
Joined
Oct 14, 2003
Messages
182
Reaction score
0
Thanks a lot!

Argh, I got the leaderboard all set up and everything and this is what I got:

Code:
Create
    Events
        Time - Elapsed game time is 30.00 seconds
    Conditions
    Actions
        Leaderboard - Create a leaderboard for (All players) titled War of the Heroes: ...
        Custom script:   set bj_wantDestroyGroup=true
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked player) controller) Equal to User
                        ((Picked player) slot status) Equal to Is playing
                    Then - Actions
                        Leaderboard - Add (Picked player) to (Last created leaderboard) with label (Name of (Picked player)) and value 0
                    Else - Actions
                        Do nothing
        Leaderboard - Show (Last created leaderboard)
And for the tallying:
Code:
Trigger Tally
    Events
        Unit - A unit Dies
    Conditions
        ((Killing unit) belongs to an ally of Player 1 (Red)) Equal to True
    Actions
        Set Player_Kills[(Player number of (Owner of (Killing unit)))] = ((Player number of (Owner of (Killing unit))) + 1)
        Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to Player_Kills[(Player number of (Owner of (Killing unit)))]
        Leaderboard - Sort (Last created leaderboard) by Value in Descending order
I know there is something wrong with it because every time I kill a unit the value goes up by 4...theres 2 problems with that. I want it so that only hero kills affect the score, and also want it to go up by 1..
 

tassadar920

Member!
Joined
May 18, 2003
Messages
2,048
Reaction score
0
Location
My house
I don't see the purpose in setting the player's kills to his number plus one... Should be:

set Player_Kills[(Player number of (Owner of (killing unit) ) ] = Players_Kills[blah blah] +1

Also you need a condition to check if it's a hero, I can't remember the name but it's probably just "unit type"
 

ChrisH36

Guy with Most Posts on Quiet Board.
Joined
May 20, 2003
Messages
15,042
Reaction score
4
Location
Temple Prime, Sarajevo
Trigger said:
((Killing unit) belongs to an ally of Player 1 (Red)) Equal to True
Shouldn't that be false. This means the trigger will only work if the unit killed was an ally.
 

i_killa_you

BattleForums Junior Member
Joined
Oct 14, 2003
Messages
182
Reaction score
0
tassadar920 said:
I don't see the purpose in setting the player's kills to his number plus one... Should be:

set Player_Kills[(Player number of (Owner of (killing unit) ) ] = Players_Kills[blah blah] +1

Also you need a condition to check if it's a hero, I can't remember the name but it's probably just "unit type"
Huh? :confused:
Shouldn't that be false. This means the trigger will only work if the unit killed was an ally.
It actually goes up in value no matter which team units you kill :-/
 

ChrisH36

Guy with Most Posts on Quiet Board.
Joined
May 20, 2003
Messages
15,042
Reaction score
4
Location
Temple Prime, Sarajevo
Awkward. Unless you create the variable array and link all elements to each player's amount of kills.
 

tassadar920

Member!
Joined
May 18, 2003
Messages
2,048
Reaction score
0
Location
My house
Yeah what I said back there...

Code:
set Player_Kills[(Player number of (Owner of (killing unit) ) ] = Players_Kills[blah blah] +1
Basically what you did the first time was you set that variable to the number of the player plus one (I don't know if you ommitted the Player_Kills variable by accident or what), but I was just rewriting it the way it should be.

Also you need the condition... (I used this in the haunted house... but I can't remember the name) " Unit - Unit Classification Check " with a check for whether the dieing unit is a hero.

And hellwolf is wrong, the condition you have just makes sure that the unit killing the other unit was an ally. Which is actually the wrong check, since you can always just kill off teamates heroes with this and rack up points.
 

ChrisH36

Guy with Most Posts on Quiet Board.
Joined
May 20, 2003
Messages
15,042
Reaction score
4
Location
Temple Prime, Sarajevo
Actually, I worded when the trigger will run. So technically I am right, I just posted it the wrong way.
 

i_killa_you

BattleForums Junior Member
Joined
Oct 14, 2003
Messages
182
Reaction score
0
Arghh thanks for the help guys, but im still having troubles..can someone edit my triggers I posted above to make it correct? That will be A LOT of help.
 

ChrisH36

Guy with Most Posts on Quiet Board.
Joined
May 20, 2003
Messages
15,042
Reaction score
4
Location
Temple Prime, Sarajevo
Actually, post your map that you are working on. I will give it a shot tommorow (makes life easier if you ahve the program that runs it).
 

i_killa_you

BattleForums Junior Member
Joined
Oct 14, 2003
Messages
182
Reaction score
0
Ok, I PMed you it.
 

Father_Chaos

BattleForums Member
Joined
Nov 23, 2005
Messages
364
Reaction score
0
As Tassadar said, just change this... you must add the kills to the Player_Kills array, not to the player number...

Code:
Trigger Tally
    Events
        Unit - A unit Dies
    Conditions
        ((Killing unit) belongs to an ally of Player 1 (Red)) Equal to True
    Actions
[COLOR="Red"]        Set Player_Kills[(Player number of (Owner of (Killing unit)))] = (Player_kills[(Player number of (Owner of (Killing unit)))] + 1)[/COLOR]
        Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to Player_Kills[(Player number of (Owner of (Killing unit)))]
        Leaderboard - Sort (Last created leaderboard) by Value in Descending order
 

ChrisH36

Guy with Most Posts on Quiet Board.
Joined
May 20, 2003
Messages
15,042
Reaction score
4
Location
Temple Prime, Sarajevo
Sorry, but the problem was solved 2 months ago Some One. You need to check the dates of the posts before you consider helping the person.
 

Father_Chaos

BattleForums Member
Joined
Nov 23, 2005
Messages
364
Reaction score
0
Oh god yeah, I saw this in the subscribed threads and I was like "What the **** is that"... Close close close !
 

ChrisH36

Guy with Most Posts on Quiet Board.
Joined
May 20, 2003
Messages
15,042
Reaction score
4
Location
Temple Prime, Sarajevo
I guess cause it was bumped, I will close it.
 
Status
Not open for further replies.

NewPosts

New threads

Top