Trying it your way the timer window still is a bit faster then the dialog timer until it hits a certain point and the dialog timer skips ahead the timer window by a full second.
The timers are still synched when testing it offline though.
I mean it's not the end of the world if there's no way to really fix this. If needed I can just use the ugly timer window.
The ugly hideous timer window.
-----
Your second method might work. I'll experiment with it more in the morning. The dialog timer is still running faster then the timer window which according to my stopwatch kept the real time while the dialog timer sped ahead just a bit (about 1.5 secs per 30 secs).
If that's the case it looks like the option is between accurate time keeping with an ugly window or a slightly faster then real time game clock with style.
-----Incoming Crappy Code-----
-----The Timer Window is a tad faster then the dialog window. It beats the dialog timer from 30 to 0 by about 1.5 secs.-----
Settings Timer
Events
Timer - Elapsed time is 1.0 Real Time seconds
Local Variables
i = 30 <Integer>
Conditions
Actions
Timer - Start Settings Timer as a One Shot timer that will expire in 30.0 Real Time seconds
Variable - Set Settings Timer = (Last started timer)
Timer - Create a timer window for Settings Timer, with the title "Game Starts in:", using Remaining time (initially Visible)
Variable - Set Settings Timer Window = (Last created timer window)
Advanced Create Dialog(300, 60, 150, 0, Top Right, Show, (All players), File, HorizontalBorder, False)
Variable - Set Settings Timer Dialog = (Last created dialog)
General - For each integer i from 30 to 0 with increment -1, do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
i != 0
Then
Dialog - Create a label for dialog Settings Timer Dialog with the dimensions (200, 50) anchored to Center with an offset of (0, 20) with the text (Combine ("Game starts in ", (Text(i)))) color set to White text writeout set to False with a writeout duration of 2.0
Variable - Set Settings Timer Dialog Window = (Last created dialog item)
General - Wait 1.0 Real Time seconds
Dialog - Destroy Settings Timer Dialog Window
Else
Dialog - Destroy Settings Timer Dialog Window
-----Advanced Create Dialog is this-----
Advanced Create Dialog
Options: Action
Return Type: (None)
Parameters
Size X = 0 <Integer>
Size Y = 0 <Integer>
Offset X = 0 <Integer>
Offset Y = 0 <Integer>
Anchor = Bottom Left <Anchor>
Show/Hide = Show <Show/Hide Option>
Show/Hide Player Group = (All players) <Player Group>
Background Image = No File <File - Image>
Background Image Type <Image Type>
Background Tiled <Boolean>
Grammar Text: Advanced Create Dialog(Size X, Size Y, Offset X, Offset Y, Anchor, Show/Hide, Show/Hide Player Group, Background Image, Background Image Type, Background Tiled)
Hint Text: (None)
Custom Script Code
Local Variables
Actions
Dialog - Create a Modal dialog of size (Size X, Size Y) at (Offset X, Offset Y) relative to Anchor of screen
Dialog - Hide the background image of (Last created dialog)
Dialog - Create an image for dialog (Last created dialog) with the dimensions (Size X, Size Y) anchored to Top Left with an offset of (0, 0) setting the tooltip to "" using the image Background Image as a Background Image Type type with tiled set to Background Tiled tint color White and blend mode Normal
Dialog - Show/Hide (Last created dialog) for Show/Hide Player Group
In the current map I am working on I have some Dialog timers that are supposed to represent how much time an actual timer has left so I don't have to use the ugly timer windows. Whenever I test the map offline the timers match up perfectly, but as soon as I test the map online the timers fall out of synch (I am using real time for all of the timers and wait commands). Is this just bound to happen or is there some way to prevent this?
I don't have a lot of experience with the map editor so I wouldn't be surprised if my newbishness is showing somewhere.
0
Trying it your way the timer window still is a bit faster then the dialog timer until it hits a certain point and the dialog timer skips ahead the timer window by a full second.
The timers are still synched when testing it offline though.
I mean it's not the end of the world if there's no way to really fix this. If needed I can just use the ugly timer window.
The ugly hideous timer window.
-----
Your second method might work. I'll experiment with it more in the morning. The dialog timer is still running faster then the timer window which according to my stopwatch kept the real time while the dialog timer sped ahead just a bit (about 1.5 secs per 30 secs).
If that's the case it looks like the option is between accurate time keeping with an ugly window or a slightly faster then real time game clock with style.
0
-----Incoming Crappy Code-----
-----The Timer Window is a tad faster then the dialog window. It beats the dialog timer from 30 to 0 by about 1.5 secs.-----
Settings Timer
Events
Timer - Elapsed time is 1.0 Real Time seconds
Local Variables
i = 30 <Integer>
Conditions
Actions
Timer - Start Settings Timer as a One Shot timer that will expire in 30.0 Real Time seconds
Variable - Set Settings Timer = (Last started timer)
Timer - Create a timer window for Settings Timer, with the title "Game Starts in:", using Remaining time (initially Visible)
Variable - Set Settings Timer Window = (Last created timer window)
Advanced Create Dialog(300, 60, 150, 0, Top Right, Show, (All players), File, HorizontalBorder, False)
Variable - Set Settings Timer Dialog = (Last created dialog)
General - For each integer i from 30 to 0 with increment -1, do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
i != 0
Then
Dialog - Create a label for dialog Settings Timer Dialog with the dimensions (200, 50) anchored to Center with an offset of (0, 20) with the text (Combine ("Game starts in ", (Text(i)))) color set to White text writeout set to False with a writeout duration of 2.0
Variable - Set Settings Timer Dialog Window = (Last created dialog item)
General - Wait 1.0 Real Time seconds
Dialog - Destroy Settings Timer Dialog Window
Else
Dialog - Destroy Settings Timer Dialog Window
-----Advanced Create Dialog is this-----
Advanced Create Dialog
Options: Action
Return Type: (None)
Parameters
Size X = 0 <Integer>
Size Y = 0 <Integer>
Offset X = 0 <Integer>
Offset Y = 0 <Integer>
Anchor = Bottom Left <Anchor>
Show/Hide = Show <Show/Hide Option>
Show/Hide Player Group = (All players) <Player Group>
Background Image = No File <File - Image>
Background Image Type <Image Type>
Background Tiled <Boolean>
Grammar Text: Advanced Create Dialog(Size X, Size Y, Offset X, Offset Y, Anchor, Show/Hide, Show/Hide Player Group, Background Image, Background Image Type, Background Tiled)
Hint Text: (None)
Custom Script Code
Local Variables
Actions
Dialog - Create a Modal dialog of size (Size X, Size Y) at (Offset X, Offset Y) relative to Anchor of screen
Dialog - Hide the background image of (Last created dialog)
Dialog - Create an image for dialog (Last created dialog) with the dimensions (Size X, Size Y) anchored to Top Left with an offset of (0, 0) setting the tooltip to "" using the image Background Image as a Background Image Type type with tiled set to Background Tiled tint color White and blend mode Normal
Dialog - Show/Hide (Last created dialog) for Show/Hide Player Group
------(source: http://www.sc2mapster.com/forums/resources/tutorials/33449-dialog-custom-dialog-technique/ )-----
-----I have a few other timers, but they essentially follow the same code and don't run at the same time (or at least aren't supposed to)-----
0
In the current map I am working on I have some Dialog timers that are supposed to represent how much time an actual timer has left so I don't have to use the ugly timer windows. Whenever I test the map offline the timers match up perfectly, but as soon as I test the map online the timers fall out of synch (I am using real time for all of the timers and wait commands). Is this just bound to happen or is there some way to prevent this?
I don't have a lot of experience with the map editor so I wouldn't be surprised if my newbishness is showing somewhere.