Snippet Kills and Data Tracking Leaderboard

Lord Regno

Active Member
Reaction score
19
In somedays I have asking people for help and they have help me so now I fink I help you to.:cool:

First I begin witch Score:

First do a new category (new map) and name it to Leaderbord

Do a new trigger named Leaderbord

Code:
Leaderbord
    Events
        Time - Elapsed game time is 5.00 seconds
    Conditions
    Actions
        Leaderboard - Create a leaderboard for (All players) titled Scores
        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) slot status) Equal to Is playing
                        ((Picked player) controller) Equal to User
                    Then - Actions
                        Leaderboard - Add (Picked player) to (Last created leaderboard) with label (Name of (Picked player)) and value Kills[0]
                    Else - Actions
                        Do nothing
        Leaderboard - Show (Last created leaderboard)

Then do a new trigger ho I calling Leaderbord update (here are victory in too markt in red)

Code:
Leaderbord update
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
    Actions
        Set Kills[(Player number of (Owner of (Killing unit)))] = (Kills[(Player number of (Owner of (Killing unit)))] + 1)
        Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to Kills[(Player number of (Owner of (Killing unit)))]
        [COLOR="DarkRed"]If (Kills[(Player number of (Owner of (Killing unit)))] Greater than or equal to 10) then do (Game - Victory (Owner of (Killing unit)) (Show dialogs, Show scores)) else do (Do nothing)[/COLOR]
        Leaderboard - Sort (Last created leaderboard) by Value in Descending order

Then do another trigger named Leaving player

Code:
Leaving player
    Events
        Player - Player 1 (Red) leaves the game
        Player - Player 2 (Blue) leaves the game
        Player - Player 3 (Teal) leaves the game
        Player - Player 4 (Purple) leaves the game
    Conditions
    Actions
        Leaderboard - Remove (Triggering player) from (Last created leaderboard)

Now I show you defeated. Name a trigger to Defeated.

Code:
Defeated
    Events
        Unit - A unit Dies
    Conditions
        Kills[(Player number of (Owner of (Killing unit)))] Equal to 10
    Actions
        Game - Display to (All players) for 10.00 seconds the text: ((Name of (Owner of (Killing unit))) +  |CFFFF0303 Is A Champion! Go with Proud!!!)
        Unit - Pause all units
        Wait 5.00 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Kills[(Player number of (Owner of (Killing unit)))] Less than or equal to 9
            Then - Actions
                Game - Defeat (Owner of (Killing unit)) with the message: Defeat! Good luck n...
            Else - Actions

Now I show you how too level a hero then it kill another hero. Do a new category named Level Hero.
And ofc. a new trigger named Levelling

Code:
Levelling
    Events
        Unit - A unit Dies
    Conditions
        ((Triggering unit) is A Hero) Equal to True
        ((Killing unit) is A Hero) Equal to True
    Actions
        Hero - Set (Killing unit) Hero-level to ((Hero level of (Killing unit)) + 1), Hide level-up graphics

I hope this help you, good luck 2 do a map.:thup:
 

Romek

Super Moderator
Reaction score
964
this looks more like a tutorial...
A tutorial would explain what each individual trigger does. This just says "Make a trigger". So I think it's a snippet.
 

Lord Regno

Active Member
Reaction score
19
What do you mean? I have done the codes like the other was doing them to me. and in the forum rules they have writing.

"We are not obligated to write triggers for people.
When people see a forum post that says, 'I need a trigger' we will only post a general outline, which is fine.
We will guide you in the right direction, but we will not do your work for you.
We are very strict about this. "

I have only post general outline and some others fings so I don't understand what you mean. I only want 2 help. And will you have done it different?
 

Romek

Super Moderator
Reaction score
964
What do you mean? I have done the codes like the other was doing them to me. and in the forum rules they have writing.

"We are not obligated to write triggers for people.
When people see a forum post that says, 'I need a trigger' we will only post a general outline, which is fine.
We will guide you in the right direction, but we will not do your work for you.
We are very strict about this. "

I have only post general outline and some others fings so I don't understand what you mean. I only want 2 help. And will you have done it different?
Huh? I think you completely misunderstood what I (or/and Xenim) posted.
Xenim just thought that this should be a tutorial. I disagreed and said it should remian a snippet...
:confused:
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top