• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Trigger "Move" Action Desync in MUI Situation?

Level 21
Joined
Mar 16, 2008
Messages
955
I haven't been able to re-create this but some players have reported desync when multiple heroes are using this ability. Could the "Unit - Move ..." action cause a desync in a multiplayer situation? if this trigger is running multiple times? does this make sense?

  • Knockback Move
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • For each (Integer kb) from 1 to KB_Max, do (Actions)
        • Loop - Actions
          • Set VariableSet point = (Position of KB_Unit[kb])
          • Set VariableSet point2 = (point offset by KB_Speed[kb] towards KB_Angle[kb] degrees.)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Terrain pathing at point2 of type Walkability is off) Equal to True
                  • KB_Dist[kb] Greater than or equal to KB_MaxDist[kb]
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • KB_Max Equal to 1
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
                  • -------- Recycle index --------
                  • Set VariableSet KB_Angle[kb] = KB_Angle[KB_Max]
                  • Set VariableSet KB_Dist[kb] = KB_Dist[KB_Max]
                  • Set VariableSet KB_MaxDist[kb] = KB_MaxDist[KB_Max]
                  • Set VariableSet KB_Speed[kb] = KB_Speed[KB_Max]
                  • Set VariableSet KB_Unit[kb] = KB_Unit[KB_Max]
                  • Set VariableSet kb = (kb - 1)
              • Set VariableSet KB_Max = (KB_Max - 1)
            • Else - Actions
              • Unit - Move KB_Unit[kb] instantly to point2
              • Special Effect - Create a special effect at point2 using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • Set VariableSet KB_Dist[kb] = (KB_Dist[kb] + KB_Speed[kb])
          • Custom script: call RemoveLocation( udg_point )
          • Custom script: call RemoveLocation( udg_point2 )

 
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
The game can crash if a unit moves out of bounds, but that's about it.

Oh and MAYBE this could cause the problem? Although, I've used it many times before without issue:
  • (Terrain pathing at point2 of type Walkability is off) Equal to True
Also, the trigger wasn't setup properly, here's how it should look:
  • Knockback Move
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • For each (Integer KB_Loop) from 1 to KB_Max, do (Actions)
        • Loop - Actions
          • Set VariableSet KB_Point1= (Position of KB_Unit[KB_Loop])
          • Set VariableSet KB_Point2 = (KB_Point1 offset by KB_Speed[KB_Loop] towards KB_Angle[KB_Loop] degrees.)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Terrain pathing at KB_Point2 of type Walkability is off) Equal to True
                  • KB_Dist[kb] Greater than or equal to KB_MaxDist[KB_Loop]
            • Then - Actions
              • -------- Recycle index --------
              • Set VariableSet KB_Angle[KB_Loop] = KB_Angle[KB_Max]
              • Set VariableSet KB_Dist[KB_Loop] = KB_Dist[KB_Max]
              • Set VariableSet KB_MaxDist[KB_Loop] = KB_MaxDist[KB_Max]
              • Set VariableSet KB_Speed[KB_Loop] = KB_Speed[KB_Max]
              • Set VariableSet KB_Unit[KB_Loop] = KB_Unit[KB_Max]
              • Set VariableSet KB_Loop = (KB_Loop - 1)
              • Set VariableSet KB_Max = (KB_Max - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • KB_Max Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
              • Unit - Move KB_Unit[KB_Loop] instantly to KB_Point2
              • Special Effect - Create a special effect at KB_Point2 using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • Set VariableSet KB_Dist[KB_Loop] = (KB_Dist[KB_Loop] + KB_Speed[KB_Loop])
          • Custom script: call RemoveLocation( udg_KB_Point1 )
          • Custom script: call RemoveLocation( udg_KB_Point2 )
Note that I renamed some variables since they were very generic. kb = KB_Loop, point/2 = KB_Point1/2.

Also, KB_Max should be 0 by default and increase by 1 whenever you cast the spell (or however it works). I assume this is how it works already.
 
Last edited:
Level 21
Joined
Mar 16, 2008
Messages
955
The game can crash if a unit moves out of bounds, but that's about it.

Oh and MAYBE this could cause the problem? Although, I've used it many times before without issue:
  • (Terrain pathing at point2 of type Walkability is off) Equal to True
Also, the trigger wasn't setup properly, here's how it should look:
  • Knockback Move
Note that I renamed some variables since they were very generic. kb = KB_Loop, point/2 = KB_Point1/2.

Also, KB_Max should be 0 by default and increase by 1 whenever you cast the spell (or however it works). I assume this is how it works already.
Do you think the "or" condition should be replaced with "and"?

Also most of your suggestions are variable names? I forgot why I needed to change the names but it's consistent throughout the imported triggers.
 
Level 23
Joined
Dec 4, 2007
Messages
1,555
You definitely need the condition set this way, so it stops running upon reaching Maxdist, or colliding with an area that is unwalkable.

I suspect a different interaction in your map, perhaps in tandem with the knockback.
 
Top