This first trigger is just to introduce you to the variables I am using.
Leaderboard
Events
Game - Map initialization
Local Variables
Row offset = 0 <Integer>
Conditions
Actions
Player Group - Pick each player in (Active Players) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Status of player (Picked player)) == Playing
Then
Variable - Modify Current no. of players: + 1
Else
Dialog - Create a Modal dialog of size (350, 500) at (0, 25) relative to Top Right of screen
Variable - Set Main Dialog window = (Last created dialog)
Variable - Set Row offset = 130
Dialog - Create a label for dialog Main Dialog window with the dimensions (220, 25) anchored to Top Left with an offset of (50, 50) with the text "Observer Dodge F</c" color set to White text writeout set to false with a writeout duration of 2.0
Dialog - Create a label for dialog Main Dialog window with the dimensions (75, 25) anchored to Top Right with an offset of (100, 100) with the text "Dodge" color set to White text writeout set to false with a writeout duration of 2.0
Dialog - Create a label for dialog Main Dialog window with the dimensions (75, 25) anchored to Top Right with an offset of (30, 100) with the text "Time" color set to White text writeout set to false with a writeout duration of 2.0
Dialog - Create an image for dialog Main Dialog window with the dimensions (282, 37) anchored to Top Left with an offset of (35, (Row offset - 9)) setting the tooltip to (Name of player 1) using the image Assets\Textures\ui_battlenet_loading_bar_player_frame_highlighted.dds as a Normal type with tiled set to false tint color (Color((Current player 1 color))) and blend mode Normal
Dialog - Create a label for dialog Main Dialog window with the dimensions (125, 25) anchored to Top Left with an offset of (50, Row offset) with the text (Name of player 1) color set to (Color((Default player 1 color))) text writeout set to true with a writeout duration of 2.0
Dialog - Create a label for dialog Main Dialog window with the dimensions (75, 25) anchored to Top Right with an offset of (45, Row offset) with the text (Text(Dodge Time[0])) color set to (Color((Default player 1 color))) text writeout set to false with a writeout duration of 2.0
Variable - Set Label Score[0] = (Last created dialog item)
Variable - Modify Row offset: + 27
Dialog - Create an image for dialog Main Dialog window with the dimensions (282, 37) anchored to Top Left with an offset of (35, (Row offset - 9)) setting the tooltip to (Name of player 2) using the image Assets\Textures\ui_battlenet_loading_bar_player_frame_highlighted.dds as a Normal type with tiled set to false tint color (Color((Current player 1 color))) and blend mode Normal
Dialog - Create a label for dialog Main Dialog window with the dimensions (125, 25) anchored to Top Left with an offset of (50, Row offset) with the text (Name of player 2) color set to (Color((Default player 1 color))) text writeout set to true with a writeout duration of 2.0
Dialog - Create a label for dialog Main Dialog window with the dimensions (75, 25) anchored to Top Right with an offset of (45, Row offset) with the text (Text(Dodge Time[1])) color set to (Color((Default player 1 color))) text writeout set to false with a writeout duration of 2.0
Variable - Set Label Score[1] = (Last created dialog item)
Variable - Modify Row offset: + 27
Dialog - Create an image for dialog Main Dialog window with the dimensions (282, 37) anchored to Top Left with an offset of (35, (Row offset - 9)) setting the tooltip to (Name of player 3) using the image Assets\Textures\ui_battlenet_loading_bar_player_frame_highlighted.dds as a Normal type with tiled set to false tint color (Color((Current player 1 color))) and blend mode Normal
Dialog - Create a label for dialog Main Dialog window with the dimensions (125, 25) anchored to Top Left with an offset of (50, Row offset) with the text (Name of player 3) color set to (Color((Default player 1 color))) text writeout set to true with a writeout duration of 2.0
Dialog - Create a label for dialog Main Dialog window with the dimensions (75, 25) anchored to Top Right with an offset of (45, Row offset) with the text (Text(Dodge Time[2])) color set to (Color((Default player 1 color))) text writeout set to false with a writeout duration of 2.0
Variable - Set Label Score[2] = (Last created dialog item)
Variable - Modify Row offset: + 27
Dialog - Create an image for dialog Main Dialog window with the dimensions (282, 37) anchored to Top Left with an offset of (35, (Row offset - 9)) setting the tooltip to (Name of player 4) using the image Assets\Textures\ui_battlenet_loading_bar_player_frame_highlighted.dds as a Normal type with tiled set to false tint color (Color((Current player 1 color))) and blend mode Normal
Dialog - Create a label for dialog Main Dialog window with the dimensions (125, 25) anchored to Top Left with an offset of (50, Row offset) with the text (Name of player 4) color set to (Color((Default player 1 color))) text writeout set to true with a writeout duration of 2.0
Dialog - Create a label for dialog Main Dialog window with the dimensions (75, 25) anchored to Top Right with an offset of (45, Row offset) with the text (Text(Dodge Time[3])) color set to (Color((Default player 1 color))) text writeout set to false with a writeout duration of 2.0
Variable - Set Label Score[3] = (Last created dialog item)
Variable - Modify Row offset: + 27
Dialog - Create an image for dialog Main Dialog window with the dimensions (282, 37) anchored to Top Left with an offset of (35, (Row offset - 9)) setting the tooltip to (Name of player 5) using the image Assets\Textures\ui_battlenet_loading_bar_player_frame_highlighted.dds as a Normal type with tiled set to false tint color (Color((Current player 1 color))) and blend mode Normal
Dialog - Create a label for dialog Main Dialog window with the dimensions (125, 25) anchored to Top Left with an offset of (50, Row offset) with the text (Name of player 5) color set to (Color((Default player 1 color))) text writeout set to true with a writeout duration of 2.0
Dialog - Create a label for dialog Main Dialog window with the dimensions (75, 25) anchored to Top Right with an offset of (45, Row offset) with the text (Text(Dodge Time[4])) color set to (Color((Default player 1 color))) text writeout set to false with a writeout duration of 2.0
Variable - Set Label Score[4] = (Last created dialog item)
Variable - Modify Row offset: + 27
Dialog - Create an image for dialog Main Dialog window with the dimensions (282, 37) anchored to Top Left with an offset of (35, (Row offset - 9)) setting the tooltip to (Name of player 6) using the image Assets\Textures\ui_battlenet_loading_bar_player_frame_highlighted.dds as a Normal type with tiled set to false tint color (Color((Current player 1 color))) and blend mode Normal
Dialog - Create a label for dialog Main Dialog window with the dimensions (125, 25) anchored to Top Left with an offset of (50, Row offset) with the text (Name of player 6) color set to (Color((Default player 1 color))) text writeout set to true with a writeout duration of 2.0
Dialog - Create a label for dialog Main Dialog window with the dimensions (75, 25) anchored to Top Right with an offset of (45, Row offset) with the text (Text(Dodge Time[5])) color set to (Color((Default player 1 color))) text writeout set to false with a writeout duration of 2.0
Variable - Set Label Score[5] = (Last created dialog item)
Variable - Modify Row offset: + 27
Dialog - Create an image for dialog Main Dialog window with the dimensions (282, 37) anchored to Top Left with an offset of (35, (Row offset - 9)) setting the tooltip to (Name of player 7) using the image Assets\Textures\ui_battlenet_loading_bar_player_frame_highlighted.dds as a Normal type with tiled set to false tint color (Color((Current player 1 color))) and blend mode Normal
Dialog - Create a label for dialog Main Dialog window with the dimensions (125, 25) anchored to Top Left with an offset of (50, Row offset) with the text (Name of player 7) color set to (Color((Default player 1 color))) text writeout set to true with a writeout duration of 2.0
Dialog - Create a label for dialog Main Dialog window with the dimensions (75, 25) anchored to Top Right with an offset of (45, Row offset) with the text (Text(Dodge Time[6])) color set to (Color((Default player 1 color))) text writeout set to false with a writeout duration of 2.0
Variable - Set Label Score[6] = (Last created dialog item)
Variable - Modify Row offset: + 27
Dialog - Create an image for dialog Main Dialog window with the dimensions (282, 37) anchored to Top Left with an offset of (35, (Row offset - 9)) setting the tooltip to (Name of player 8) using the image Assets\Textures\ui_battlenet_loading_bar_player_frame_highlighted.dds as a Normal type with tiled set to false tint color (Color((Current player 1 color))) and blend mode Normal
Dialog - Create a label for dialog Main Dialog window with the dimensions (125, 25) anchored to Top Left with an offset of (50, Row offset) with the text (Name of player 8) color set to (Color((Default player 1 color))) text writeout set to true with a writeout duration of 2.0
Dialog - Create a label for dialog Main Dialog window with the dimensions (75, 25) anchored to Top Right with an offset of (45, Row offset) with the text (Text(Dodge Time[7])) color set to (Color((Default player 1 color))) text writeout set to false with a writeout duration of 2.0
Variable - Set Label Score[7] = (Last created dialog item)
Variable - Modify Row offset: + 27
Dialog - Create an image for dialog Main Dialog window with the dimensions (282, 37) anchored to Top Left with an offset of (35, (Row offset - 9)) setting the tooltip to (Name of player 9) using the image Assets\Textures\ui_battlenet_loading_bar_player_frame_highlighted.dds as a Normal type with tiled set to false tint color (Color((Current player 1 color))) and blend mode Normal
Dialog - Create a label for dialog Main Dialog window with the dimensions (125, 25) anchored to Top Left with an offset of (50, Row offset) with the text (Name of player 9) color set to (Color((Default player 1 color))) text writeout set to true with a writeout duration of 2.0
Dialog - Create a label for dialog Main Dialog window with the dimensions (75, 25) anchored to Top Right with an offset of (45, Row offset) with the text (Text(Dodge Time[8])) color set to (Color((Default player 1 color))) text writeout set to false with a writeout duration of 2.0
Variable - Set Label Score[8] = (Last created dialog item)
Variable - Modify Row offset: + 27
Dialog - Create an image for dialog Main Dialog window with the dimensions (282, 37) anchored to Top Left with an offset of (35, (Row offset - 9)) setting the tooltip to (Name of player 10) using the image Assets\Textures\ui_battlenet_loading_bar_player_frame_highlighted.dds as a Normal type with tiled set to false tint color (Color((Current player 1 color))) and blend mode Normal
Dialog - Create a label for dialog Main Dialog window with the dimensions (125, 25) anchored to Top Left with an offset of (50, Row offset) with the text (Name of player 10) color set to (Color((Default player 1 color))) text writeout set to true with a writeout duration of 2.0
Dialog - Create a label for dialog Main Dialog window with the dimensions (75, 25) anchored to Top Right with an offset of (45, Row offset) with the text (Text(Dodge Time[9])) color set to (Color((Default player 1 color))) text writeout set to false with a writeout duration of 2.0
Variable - Set Label Score[9] = (Last created dialog item)
Variable - Modify Row offset: + 27
Dialog - Create an image for dialog Main Dialog window with the dimensions (282, 37) anchored to Top Left with an offset of (35, (Row offset - 9)) setting the tooltip to (Name of player 11) using the image Assets\Textures\ui_battlenet_loading_bar_player_frame_highlighted.dds as a Normal type with tiled set to false tint color (Color((Current player 1 color))) and blend mode Normal
Dialog - Create a label for dialog Main Dialog window with the dimensions (125, 25) anchored to Top Left with an offset of (50, Row offset) with the text (Name of player 11) color set to (Color((Default player 1 color))) text writeout set to true with a writeout duration of 2.0
Dialog - Create a label for dialog Main Dialog window with the dimensions (75, 25) anchored to Top Right with an offset of (45, Row offset) with the text (Text(Dodge Time[10])) color set to (Color((Default player 1 color))) text writeout set to false with a writeout duration of 2.0
Variable - Set Label Score[10] = (Last created dialog item)
Variable - Modify Row offset: + 27
Dialog - Create an image for dialog Main Dialog window with the dimensions (282, 37) anchored to Top Left with an offset of (35, (Row offset - 9)) setting the tooltip to (Name of player 12) using the image Assets\Textures\ui_battlenet_loading_bar_player_frame_highlighted.dds as a Normal type with tiled set to false tint color (Color((Current player 1 color))) and blend mode Normal
Dialog - Create a label for dialog Main Dialog window with the dimensions (125, 25) anchored to Top Left with an offset of (50, Row offset) with the text (Name of player 12) color set to (Color((Default player 1 color))) text writeout set to true with a writeout duration of 2.0
Dialog - Create a label for dialog Main Dialog window with the dimensions (75, 25) anchored to Top Right with an offset of (45, Row offset) with the text (Text(Dodge Time[11])) color set to (Color((Default player 1 color))) text writeout set to false with a writeout duration of 2.0
Variable - Set Label Score[11] = (Last created dialog item)
Variable - Modify Row offset: + 27
Dialog - Show Main Dialog window for (All players)
Variable - Set Row Offset for theme = Row offset
Variable - Set Current no. of players = 0
Variable - Set Row Offset for theme = 0
The 4 following triggers are what I have in mind as a solution to my problem at the moment.
Enter
Events
Unit - Any Unit Enters Field
Local Variables
Conditions
Actions
General - Pick each integer from 1 to 12, and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Owner of (Triggering unit)) == (Picked integer)
Then
Variable - Set Dodging[(Owner of (Triggering unit))] = true
Else
Leave
Events
Unit - Any Unit Leaves Field
Local Variables
Conditions
Actions
General - Pick each integer from 1 to 12, and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Owner of (Triggering unit)) == (Picked integer)
Then
Variable - Set Dodging[(Owner of (Triggering unit))] = false
Else
Die
Events
Unit - Any Unit dies
Local Variables
Conditions
Actions
General - Pick each integer from 1 to 12, and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Owner of (Triggering unit)) == (Picked integer)
Then
Variable - Set Dodging[(Owner of (Triggering unit))] = false
Else
Update
Events
Timer - Every 1.0 seconds of Real Time
Local Variables
Conditions
Actions
General - Pick each integer from 0 to 11, and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
Dodging[(Picked integer)] == true
Then
Variable - Modify Dodge Time[(Picked integer)]: + 1
Leaderboard - Set Leaderboard item text at column 2 and row (Picked integer) to (Text(Dodge Time[(Picked integer)]))
Else
I believe they make a lot of sense... But it doesn't look like it'll update my leaderboard. >_>
The only source of error I see is in the last trigger... I pick integers from 0 to 11, and try to generate a number at row(Picked Integer), thus Row(0) is in there.
Though I tried to do it with a separate Pick Integer 1 to 12, and it still didn't work...
In fact, what I'd really need is a way to set "(Picked integer) - 1" as an input...
I hope those triggers helped you guys with my problem.
EDIT: If you are interested in helping out and want to test shit, here's the map: