• 🏆 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!

Leader bord triggers plz???

Status
Not open for further replies.
Level 5
Joined
Sep 22, 2004
Messages
98
:( :( could u guys show me how to make and add points to a leader board i have so many maps that have to have a leader board its crazy plz show me the triggers for it this is one like 2 triggers i dont know i have seen it how they do it in other maps but got confused :( :( :( :( :( :( plz idd apreciate it if udd help ive looked evey where they have tutorails for it in german and thats all so plz help or at least tell me if theres a post sum where :( :(
 
Level 5
Joined
Sep 22, 2004
Messages
98
ok i think i have found it can u guys tell me if this is right

________________
Events
Map Initialization
Conditions
---
Actions
Create a leaderboard

Update Kills trig

Events
A unit dies
Conditions
(Owner of (Killing Unit)) not equal to neutral hostile
(Owner of (Killing Unit)) not equal to neutral passive
(Owner of (Killing Unit)) not equal to whoever players aren't supposed to have score
Actions
Set the score of (Owner of (Killing unit)) in Leaderboard to Score of Owner of Killing unit+1
 
Level 5
Joined
Jun 21, 2004
Messages
148
My Example:

Code:
Leaderboard
    Events
        Time - Elapsed game time is 5.00 seconds
    Conditions
    Actions
        Leaderboard - Create a leaderboard for (All players) titled Hero Kills
        Leaderboard - Show (Last created leaderboard)
        Wait 0.20 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Player 1 (Red) slot status) Equal to Is playing
            Then - Actions
                Leaderboard - Add Player 1 (Red) to (Last created leaderboard) with label (Name of Player 1 (Red)) and value 0
            Else - Actions

Set in the player who are playing, repeat for more players.

Code:
Leaderboard Updater
    Events
        Time - Every 0.50 seconds of game time
    Conditions
    Actions
        Leaderboard - Sort (Last created leaderboard) by Value in Descending order

Updates in duh

Code:
Red Kills
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) belongs to an enemy of Player 1 (Red)) Equal to True
        (Killing unit) Equal to z_Red
    Actions
        Set aR = (aR + 1)
        Leaderboard - Change the value for Player 1 (Red) in (Last created leaderboard) to aR

z_red is my variable for the red hero
aR is my variable for reds total kills
repeat for multiple players/heroes

Code:
Red Leaves
    Events
        Player - Player 1 (Red) leaves the game
    Conditions
    Actions
        Unit - Remove z_Red from the game
        Game - Display to (All players) for 10.00 seconds the text: ((Name of Player 1 (Red)) +  has left the game.)
        Leaderboard - Remove Player 1 (Red) from (Last created leaderboard)

Removes from the board not required
 
Level 9
Joined
Sep 8, 2004
Messages
633
to prevent repetative work, use integers, make a variable named 'player' (type: player; array (number of players))

The setup trigger:

Leaderboard
Events
Time - Elapsed game time is 5.00 seconds
Conditions
Actions
Leaderboard - Create a leaderboard for (All players) titled Hero Kills
Leaderboard - Show (Last created leaderboard)
Wait 0.20 seconds
For each integer (1-x)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Player(x) Equal to Is playing
Then - Actions
Leaderboard - Add Player(x) to (Last created leaderboard) with label (Name of Player(x) and value 0
Else - Actions
 
Status
Not open for further replies.
Top