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

[Trigger] Multiboard

Status
Not open for further replies.
Level 8
Joined
Dec 16, 2007
Messages
252
It's hard to check if it will work in single player. What I'm worried about is if the values will change correctly, and in the right lines. Wonder if someone could take a look or more at it (It's quite a .. huge trigger, but you don't have to read all lines to check).

This is how the value should change
Killing a enemy unit will result the dying unit's Death Count +1 and Score Count -1
Killing yourself or die will result Death Count -1 and Score Count -1
Killing your friends will result Score Count -1
Being killed by a friend will not affect your score but will result Death Count +1

  • Multiboard
    • Events
      • Time - Elapsed game time is 10.00 seconds
    • Conditions
    • Actions
      • Set A_H = (All players matching ((((Matching player) is an ally of Player 1 (Red)) Equal to True) and (((Matching player) slot status) Equal to Is playing)))
      • Set A_CH = (All players matching ((((Matching player) is an enemy of Player 1 (Red)) Equal to True) and (((Matching player) slot status) Equal to Is playing)))
      • Multiboard - Create a multiboard with 4 columns and (2 + ((Number of players in A_CH) + (Number of players in A_H))) rows, titled Scores
      • -------- Row 1 --------
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to (|cffff0000Hookerist - + ((String((Number of players in A_H))) + players|r))
      • Multiboard - Set the text for (Last created multiboard) item in column 3, row 1 to |cffffcc00Score|r
      • Multiboard - Set the text for (Last created multiboard) item in column 4, row 1 to |cffffcc00Deaths|r
      • -------- Row 2 --------
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row (2 + (Number of players in A_H)) to (|c000042ffCounter-Hookerist - + ((String((Number of players in A_CH))) + players|r))
      • -------- Loop --------
      • For each (Integer A) from 1 to (2 + ((Number of players in A_CH) + (Number of players in A_H))), do (Actions)
        • Loop - Actions
          • Multiboard - Set the display style for (Last created multiboard) item in column 1, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 2, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 3, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the display style for (Last created multiboard) item in column 4, row (Integer A) to Show text and Hide icons
          • Multiboard - Set the width for (Last created multiboard) item in column 1, row (Integer A) to 20.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 2, row (Integer A) to 5.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 3, row (Integer A) to 5.00% of the total screen width
          • Multiboard - Set the width for (Last created multiboard) item in column 4, row (Integer A) to 5.00% of the total screen width
      • Set A_List = 2
      • Player Group - Pick every player in A_H and do (Actions)
        • Loop - Actions
          • Set A_Spots[(Player number of (Picked player))] = A_List
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row A_List to (|cffff0000 + ((Name of (Picked player)) + |r))
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row A_List to 0
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row A_List to 0
          • Set A_List = (A_List + 1)
      • Set A_List2 = (3 + (Number of players in A_H))
      • Player Group - Pick every player in A_CH and do (Actions)
        • Loop - Actions
          • Set A_Spots2[(Player number of (Picked player))] = A_List2
          • Multiboard - Set the text for (Last created multiboard) item in column 1, row A_List2 to (|c000042ff + ((Name of (Picked player)) + |r))
          • Multiboard - Set the text for (Last created multiboard) item in column 2, row A_List2 to 0
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row A_List2 to 0
          • Set A_List2 = (A_List2 + 1)
      • Multiboard - Minimize (Last created multiboard)

  • Kill
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Butcher
      • Or - Any (Conditions) are true
        • Conditions
          • ((Triggering unit) belongs to an ally of Player 9 (Gray)) Equal to True
          • ((Triggering unit) belongs to an ally of Player 8 (Pink)) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
        • Then - Actions
          • Set Score_Count[(Player number of (Owner of (Killing unit)))] = (Score_Count[(Player number of (Owner of (Killing unit)))] + 1)
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row (1 + (Player number of (Owner of (Killing unit)))) to (String(Score_Count[(Player number of (Owner of (Killing unit)))]))
          • Set Death_Count[(Player number of (Owner of (Triggering unit)))] = (Death_Count[(Player number of (Owner of (Triggering unit)))] + 1)
          • Multiboard - Set the text for (Last created multiboard) item in column 4, row (1 + (Player number of (Owner of (Triggering unit)))) to (String(Death_Count[(Player number of (Owner of (Triggering unit)))]))
        • Else - Actions
          • Set Score_Count[(Player number of (Owner of (Killing unit)))] = (Score_Count[(Player number of (Owner of (Killing unit)))] - 1)
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row (3 + (Number of players in A_H)) to (String(Score_Count[(Player number of (Owner of (Killing unit)))]))
          • Set Counter = (Counter + 1)
  • Kill 2
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Butcher
      • Or - Any (Conditions) are true
        • Conditions
          • ((Triggering unit) belongs to an ally of Player 1 (Red)) Equal to True
          • ((Triggering unit) belongs to an ally of Player 2 (Blue)) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True
        • Then - Actions
          • Set Score_Count[(Player number of (Owner of (Killing unit)))] = (Score_Count[(Player number of (Owner of (Killing unit)))] + 1)
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row (2 + (Player number of (Owner of (Killing unit)))) to (String(Score_Count[(Player number of (Owner of (Killing unit)))]))
          • Set Death_Count[(Player number of (Owner of (Triggering unit)))] = (Death_Count[(Player number of (Owner of (Triggering unit)))] + 1)
          • Multiboard - Set the text for (Last created multiboard) item in column 4, row (1 + (Player number of (Owner of (Triggering unit)))) to (String(Death_Count[(Player number of (Owner of (Triggering unit)))]))
        • Else - Actions
          • Set Score_Count[(Player number of (Owner of (Killing unit)))] = (Score_Count[(Player number of (Owner of (Killing unit)))] - 1)
          • Multiboard - Set the text for (Last created multiboard) item in column 3, row (1 + (Player number of (Owner of (Killing unit)))) to (String(Score_Count[(Player number of (Owner of (Killing unit)))]))
          • Set Counter = (Counter + 1)
 
Level 16
Joined
Feb 22, 2006
Messages
960
i fast looked at it and the only thing i saw is the force leak in the first trigger (maybe there are more things^^) would better to fix it
costum script: call DestroyForce(udg_A_H)
costum script: call DestroyForce(udg_A_CH)

but all in all it should work
 
Status
Not open for further replies.
Top