• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Annoying desync issue. Counters do not advance at the same time

Level 17
Joined
Jun 2, 2009
Messages
1,150
Hello everyone. I have a 3 timers. I will share the entire triggers with unnecessary parts just in case

1-) Game Timer. This trigger is initially off. Trigger runs by COMMAND AP
  • gametimer
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set saniye = (saniye + 1)
      • Set ToplamGecenSaniye = (ToplamGecenSaniye + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (ToplamGecenSaniye mod 120) Equal to 0
        • Then - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (ToplamGecenSaniye mod 30) Equal to 0
          • ToplamGecenSaniye Greater than FirstCreepWaveTime
        • Then - Actions
          • If ((Clan Devils Barracks 0020 <gen> is alive) Equal to True) then do (Trigger - Run reaper orta <gen> (checking conditions)) else do (Trigger - Run reaper orta upgrade <gen> (checking conditions))
          • If ((Clan Devils Barracks 0021 <gen> is alive) Equal to True) then do (Trigger - Run reaper ust <gen> (checking conditions)) else do (Trigger - Run reaper ust upgrade <gen> (checking conditions))
          • If ((Clan Devils Barracks 0019 <gen> is alive) Equal to True) then do (Trigger - Run reaper alt <gen> (checking conditions)) else do (Trigger - Run reaper alt upgrade <gen> (checking conditions))
          • If ((Clan Reapers Barracks 0016 <gen> is alive) Equal to True) then do (Trigger - Run devil ust <gen> (checking conditions)) else do (Trigger - Run devil ust upgrade <gen> (checking conditions))
          • If ((Clan Reapers Barracks 0017 <gen> is alive) Equal to True) then do (Trigger - Run devil orta <gen> (checking conditions)) else do (Trigger - Run devil orta upgrade <gen> (checking conditions))
          • If ((Clan Reapers Barracks 0018 <gen> is alive) Equal to True) then do (Trigger - Run devil alt <gen> (checking conditions)) else do (Trigger - Run devil alt upgrade <gen> (checking conditions))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • saniye Equal to 60
        • Then - Actions
          • Set dakika = (dakika + 1)
          • Set saniye = 0
        • Else - Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Leaderboard - Add Player 6 (Orange) to ck_board[(Integer A)] with label (Game Time: + ((String(dakika)) + ( : + (String(saniye))))) and value 0
          • Leaderboard - Change the display style for Player 6 (Orange) in ck_board[(Integer A)] to Show the label, Hide the value, and Hide the icon
2-) Timer about the Gold Mines This trigger is initially off. Trigger runs by COMMAND AP

  • Maden
    • Events
    • Conditions
    • Actions
      • Set MadenTick[1] = 1
      • Set MadenTime = 1020.00
      • Countdown Timer - Start MadenTimer[1] as a One-shot timer that will expire in MadenTime seconds
      • Set MadenTimer[1] = (Last started timer)
      • Countdown Timer - Create a timer window for (Last started timer) with title |cFF0080FFMadenler|...
      • Set MadenWindow[1] = (Last created timer window)
      • For each (Integer A) from 1 to 14, do (Actions)
        • Loop - Actions
          • Countdown Timer - Show MadenWindow[1] for (Player((Integer A)))
      • Trigger - Turn on Maden Gold <gen>
3-) Trigger about mechanics This trigger is initially off. Trigger runs by COMMAND AP

  • Oyun baslangic timer
    • Events
    • Conditions
    • Actions
      • Countdown Timer - Start Tank_TimerSiege as a One-shot timer that will expire in 660.00 seconds
      • Countdown Timer - Create a timer window for (Last started timer) with title Mekanik 1
      • Set TankTimerW = (Last created timer window)
      • Countdown Timer - Change the color of the title for (Last created timer window) to (100.00%, 0.00%, 100.00%) with 0.00% transparency
All of these triggers runs in here.
Trigger: COMMAND AP

  • Command AP
    • Events
      • Time - Elapsed game time is 10.00 seconds
    • Conditions
      • mod_vs Equal to False
      • mod_cm Equal to False
      • mod_tp Equal to False
    • Actions
      • Set GameStarted = True
      • Game - Display to (All players) the text: |cfff5f5f5Oyun modu...
      • Countdown Timer - Start TimerCmCreepSpawn as a One-shot timer that will expire in 120.00 seconds
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Set (Picked player) Current lumber to 1
      • Set FirstCreepWaveTime = 120
      • Trigger - Turn off Command TEST <gen>
      • Trigger - Turn off Command CM <gen>
      • Trigger - Turn off Command VS <gen>
      • Trigger - Turn off Command SS <gen>
      • Countdown Timer - Start timer_creep_cikis_ap as a One-shot timer that will expire in 120.00 seconds
      • Countdown Timer - Start timer_lord_creep_devam as a One-shot timer that will expire in 2760.00 seconds
      • Countdown Timer - Start timer_nc_kucuk as a One-shot timer that will expire in 120.00 seconds
      • Trigger - Run Maden <gen> (checking conditions)
      • Trigger - Run Oyun baslangic timer <gen> (checking conditions)
      • Trigger - Turn on gametimer <gen>
      • Set mod_ap = True
Here is the problem.
gametimer ALWAYS desyncs with
  • Countdown Timer - Start Tank_TimerSiege as a One-shot timer that will expire in 660.00 seconds
and

  • Set MadenTick[1] = 1
  • Set MadenTime = 1020.00
  • Countdown Timer - Start MadenTimer[1] as a One-shot timer that will expire in MadenTime seconds
  • Set MadenTimer[1] = (Last started timer)
  • Countdown Timer - Create a timer window for (Last started timer) with title |cFF0080FFMadenler|...
  • Set MadenWindow[1] = (Last created timer window)
These two triggers always syncs with each other but gametimer ALWAYS desyncs half a second.

It is not a big deal but i have annoyed because i cannot solve it.
I am suspecting about every 1 seconds event. Because i don't know how it affects when you decide to run it before second passed and currently i cannot test it by my own.
 
Level 20
Joined
Feb 27, 2019
Messages
594
The "Time - Every X seconds of game time" event starts a timer at the start of the game that runs all the time, even if the trigger is turned off.

You can start and control the timer yourself which might help.
  • Countdown Timer - Start GameTimer as a Repeating timer that will expire in 1.00 seconds
 
Level 17
Joined
Jun 2, 2009
Messages
1,150
Update: It seems i give up. Something is interferes or still i don't understand why. I have tried your solution and tried to create new integer and still it is the same. I give up. As i said it was not a bir problem. I just wanted to learn why.
 
Last edited:
Top