Win Conditions for Leaderboard - Help

AnthraxXx

New Member
Reaction score
25
I have a leaderboard that lists all players + updates their hero kills.
I want to make a part that lists Team1 Kills and Team2 Kills - How would I do this?

Also I want it so when Team1 or 2 total kills gets to say... 20? Run victory conditions for the team that got 20, run defeat conditions for the team that didn't get 20 total kills.

Here is my leaderboard so far:

Trigger Name:
Code:
leaderboard
    Events
        Time - Elapsed game time is 5.00 seconds
    Conditions
    Actions
        Leaderboard - Create a leaderboard for (All players) titled UHA Kill Count
        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)

Trigger Name:
Code:
leaderboardtally
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
    Actions
        Set Player_Kills[(Player number of (Owner of (Killing unit)))] = Player_Kills[((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

[INITIALLY OFF] Trigger name:
Code:
leaderboardupdate
    Events
    Conditions
    Actions
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                Leaderboard - Change the value for (Player((Integer A))) in (Last created leaderboard) to Player_Kills[(Integer A)]

So what would I have to add/change from that to achieve the desired results?

Thanks!
 

Choppa

www.warcraft-gamers.po.gs
Reaction score
59
Make two new columns for each team and do a loop like

For each int A from 1 to 5
Loop
Set teamKills = teamKills + Player_Kills[(Player number of (Integer A)))]

For team 1 and for team two (presuming each team has 5 players)

For each int A from 6 to 10
Loop
Set teamKills = teamKills + Player_Kills[(Player number of (Integer A)))]

That will do the team kills and what not, and to check the condition...

Code:
leaderboardtally
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
    Actions
        Set Player_Kills[(Player number of (Owner of (Killing unit)))] = Player_Kills[((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)))]
        If teamKills Greater then or equal to 20 Then Do
          Actions
             Trigger - Run trigger - Victory
        Leaderboard - Sort (Last created leaderboard) by Value in Descending order
 

AnthraxXx

New Member
Reaction score
25
I don't get the bit before the Code bit. How would I make two new columns for each team? Do you mean Rows?

And where do I put:
For each int A from 1 to 5
Loop
Set teamKills = teamKills + Player_Kills[(Player number of (Integer A)))]

For team 1 and for team two (presuming each team has 5 players)

For each int A from 6 to 10
Loop
Set teamKills = teamKills + Player_Kills[(Player number of (Integer A)))]

That will do the team kills and what not, and to check the condition...

Sorry if I don't understand or anything but I perfectly get the last bit.
 

Choppa

www.warcraft-gamers.po.gs
Reaction score
59
Actually there are many ways you can do this...

I meant two new columns, idk, leaderboards are gay, you should use a multiboard.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top