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

Score board help

Status
Not open for further replies.
Level 1
Joined
May 13, 2009
Messages
3
ok so im starting a single player campaign and need a little help setting up some triggers.
the hero is an undead taking revenge on the living...there are three types of enemies: men, women, and children. i would like it so that each enemy give a different score value. there will be no other allies for the hero and none can be produced.

Men = 5 pts
women = 20 pts
children = 10 pts

i know how to get the multiboard working and to update...but i cant figure out how to get the custom points for each enemy to work right...

all the other tutorials ive seen are for multiplayer and only use a single point for a single kill......

any help would be greatly appreciated....and i will give credit where credit is due...
 
Level 1
Joined
May 13, 2009
Messages
3
ok so ive been staring at my monitor all day looking at tutorials and i think i have it correct but i would like someone to check it for leaks...

  • update1
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Dying unit)) Equal to Children
        • Then - Actions
          • Set PTs[(Player number of (Owner of (Killing unit)))] = (PTs[(Player number of (Owner of (Killing unit)))] + 10)
          • Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to PTs[(Player number of (Owner of (Killing unit)))]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Dying unit)) Equal to Men (Male)
        • Then - Actions
          • Set PTs[(Player number of (Owner of (Killing unit)))] = (PTs[(Player number of (Owner of (Killing unit)))] + 5)
          • Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to PTs[(Player number of (Owner of (Killing unit)))]
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Dying unit)) Equal to Females (Female)
        • Then - Actions
          • Set PTs[(Player number of (Owner of (Killing unit)))] = (PTs[(Player number of (Owner of (Killing unit)))] + 20)
          • Leaderboard - Change the value for (Owner of (Killing unit)) in (Last created leaderboard) to PTs[(Player number of (Owner of (Killing unit)))]
        • Else - Actions
in the above trigger, the unit types are custom units, and PTs is a integer variable with the array on.





  • Scoreboard
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Leaderboard - Create a leaderboard for Player Group - Player 1 (Red) titled Score
      • Player Group - Pick every player in Player Group - Player 1 (Red) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 1 (Red) controller) Equal to User
            • Then - Actions
              • Leaderboard - Add Player 1 (Red) to (Last created leaderboard) with label Hero and value 0
            • Else - Actions
      • Leaderboard - Show (Last created leaderboard)
in the above trigger if one where to have multiple players just change the player1 to all players


i have tested it and it seems to work correctly...the scores are tallied correctly....
now is there a way, so if i decide to have more custom dying units with different point values, to make the trigger a little more condensed so i don't have multiple if,then,else statements regarding the score for 25 - 50 different units?


this score board is based off of the leader board tutorial by Archian, i just spend all day adapting and debuging to my specification
 
Last edited:
Status
Not open for further replies.
Top