Nice job Mindy! Thanks for adding my ideas.
-Saitek
[EDIT]
Here's a trigger that syncs the system clock with the Warcraft 3 game clock.
function Trig_Real_Time_Actions
takes nothing returns nothingcall SetTimeOfDay
((I2R
(GetTimeHours
())) +
(I2R
(GetTimeMinutes
()))/60 +
(I2R
(GetTimeSeconds
()))/3600
)endfunction//=========================================================================== function InitTrig_Real_Time
takes nothing returns nothing set gg_trg_Real_Time = CreateTrigger
( ) call TriggerRegisterTimerEventPeriodic
( gg_trg_Real_Time, 30.00
) call TriggerRegisterTimerEventSingle
( gg_trg_Real_Time, 0.00
) call TriggerAddAction
( gg_trg_Real_Time,
function Trig_Real_Time_Actions
) call SetTimeOfDayScale
(0.0055
)endfunction The time is re synced every 30 seconds just in case someone pauses the game thus pausing the
WC3 clock.
Note: This will only work in single player.
In a LAN or Bnet game it will cause a desync.
Have fun!
