• 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.

[Trigger] Leaderboard Kills & Life trouble

Status
Not open for further replies.
Level 2
Joined
Feb 24, 2008
Messages
12
I am having trouble getting my leaderboard to work and register the players kills on the board itself. The board displays and has values of 0 but they do not change when units(creeps) are killed. Btw this is a TD map. I am also have trouble with setting lives, and displaying how many they have left in leaderboard. If anyone can help me out by displaying a few triggers on the forum with detailed information on what variables need to be declared and the type, mine do not seem to work. I also have aim and I am usually online. Drumerdude150. Thanks for your help, its much appreciated!
 
Level 2
Joined
Feb 24, 2008
Messages
12
  • Events
    • Unit - A unit Dies
  • Conditions
    • (Unit-type of (Triggering unit)) Equal to creeps[level]
  • Actions
    • Set pkill[(Player number of (Owner of (Killing unit)))] = (pkill[(Player number of (Owner of (Killing unit)))] + 1)
    • Leaderboard - Change the value for Player 1 (Red) in (Last created leaderboard) to pkill[1]
    • Leaderboard - Change the value for Player 2 (Blue) in (Last created leaderboard) to pkill[1]
    • Leaderboard - Change the value for Player 3 (Teal) in (Last created leaderboard) to kills[4]
    • Leaderboard - Change the value for Player 4 (Purple) in (Last created leaderboard) to kills[4]
    • Leaderboard - Change the value for Player 5 (Yellow) in (Last created leaderboard) to kills[5]
    • Leaderboard - Change the value for Player 6 (Orange) in (Last created leaderboard) to kills[6]
 
Level 5
Joined
Aug 16, 2007
Messages
149
Show us your trigger for creating the leaderboard. It might be the cause of the problem. Also, you should set the leaderboard to a variable.
 
Level 7
Joined
Dec 8, 2005
Messages
319
  • Untitled Trigger 002
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Leaderboard - Create a leaderboard for (All players) titled Word Up
      • Set Leader = (Last created leaderboard)
      • Leaderboard - Add Player 1 (Red) to Leader with label Player 1 and value 0
      • Leaderboard - Add Player 2 (Blue) to Leader with label Player 2 and value 0
      • Leaderboard - Show Leader
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to False
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is A structure) Equal to False
        • Then - Actions
          • Leaderboard - Change the value for (Owner of (Killing unit)) in Leader to ((Owner of (Killing unit)) Units Killed)
        • Else - Actions
why dont you just use this trigger. or you could use variables but if that is the case. can we see your display trigger and also you integer triggers. to help figure out your problem.

and as bubba said. you should use an integer over last created. just easier and allows for a name or change it around if you wanted to do something more advanced.

oh and i am not sure you need that condition... use something like what i just gave... because i think your trying to do a creep count and not a hero count... and so that should fix that and leader= variable(Leaderboard)

oh and the killing unit...that works for all heros... so now you dont have to set it to indivual values... that takes to long.

hope this helps =D
 
Last edited:
Level 2
Joined
Feb 24, 2008
Messages
12
Hairybeavet, I used your triggers and the leaderboard works, thank you so much for your help, in fact thank you everyone who helped me out in this thread. I still have a persisting problem. I still need to set lives in leaderboard and I need to take lives away when creeps enter "loses life region" on my map
 
Status
Not open for further replies.
Top