• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Could any of these triggers cause desyncs?

Status
Not open for further replies.
Level 8
Joined
Jul 25, 2009
Messages
194
So I'm trying to fix one of my old maps which is pretty well known for desyncing. Was wondering if any of these triggers could possibly cause a desync and under what circumstances?

  • prevent double uu
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to |cff00fa9aUltimate Upgrade|r
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Custom value of (Triggering unit)) Equal to 666
        • Then - Actions
          • Item - Remove (Item being manipulated)
        • Else - Actions
          • Unit - Set the custom value of (Hero manipulating item) to 666
  • Undead Gold Income
    • Events
      • Time - Every 4.60 seconds of game time
    • Conditions
      • AAA_TurnOffEvents Equal to False
    • Actions
      • Player Group - Pick every player in Evil and do (Actions)
        • Loop - Actions
          • If (((Picked player) slot status) Equal to Is playing) then do (Player - Set (Picked player) Current gold to (((Picked player) Current gold) + 1)) else do (Do nothing)
 
Level 39
Joined
Feb 27, 2007
Messages
4,994
If there are lots of triggers it's a lot to look into. I would suggest putting a vJASS hook to catch GetLocalPlayer() calls, as those are most likely going to be the source of desyncs. Something like:
JASS:
library DesyncCheck
    globals
        public integer COUNT = 0
    endglobals

    public function onGLP takes nothing returns nothing
        set COUNT = COUNT + 1
        call BJDebugMsg("GLP call number "+I2S(COUNT))
    endfunction

    hook GetLocalPlayer onGLP
endlibrary
Not super helpful on its own since GLP() has no arguments you can learn something from with the hook... but there might be something you can learn that way about the desyncs. You could make other simple libraries for common desync issues to see what those turn up too. Just thoughts.
 
Status
Not open for further replies.
Top