• 🏆 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!

Can those triggers lead to desync

Status
Not open for further replies.
Level 11
Joined
Jul 17, 2013
Messages
544
ugh so guys i recently noticed that my game desync i will show you a few things i hope its not too much firstly i will show u triggers that are running full game i think they can desync.
  • SB Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer SBLoop) from 1 to ID2, do (Actions)
        • Loop - Actions
          • Set SBArray = ID[SBLoop]
          • Set SBBladePos[SBArray] = (Position of SBBlade[SBArray])
          • Set SBBladePos_second = (SBBladePos[SBArray] offset by SBBladeSpeed towards SBAngle[SBArray] degrees)
          • Set SBDistance[SBArray] = (SBDistance[SBArray] + (Integer(SBBladeSpeed)))
          • Set SBUnitGroup[SBArray] = (Units within SBRadius of SBBladePos[SBArray])
          • Unit - Move SBBlade[SBArray] instantly to SBBladePos_second
          • Custom script: call RemoveLocation(udg_SBBladePos_second)
          • Custom script: call RemoveLocation(udg_SBBladePos[udg_SBArray])
          • Unit Group - Pick every unit in SBUnitGroup[SBArray] and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is alive) Equal to True
                  • ((Picked unit) is in SBUnitGroupDamaged[SBArray]) Equal to False
                  • ((Picked unit) belongs to an enemy of (Owner of SBBlade[SBArray])) Equal to True
                • Then - Actions
                  • Unit - Cause SBBlade[SBArray] to damage (Picked unit), dealing SBDamage damage of attack type Spells and damage type Normal
                  • -------- The effect (below) appears on every cutted enemy. --------
                  • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Unit Group - Add (Picked unit) to SBUnitGroupDamaged[SBArray]
                • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SBDistance[SBArray] Greater than or equal to SBMaxDistance[SBArray]
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SBTransparency[SBArray] Greater than or equal to 100
                • Then - Actions
                  • Unit - Remove SBBlade[SBArray] from the game
                  • Custom script: call DestroyGroup(udg_SBUnitGroupDamaged[udg_SBArray])
                  • Set ID[SBLoop] = ID[ID2]
                  • Set ID[ID2] = SBArray
                  • Set ID2 = (ID2 - 1)
                  • Set SBLoop = (SBLoop - 1)
                • Else - Actions
                  • Animation - Change SBBlade[SBArray]'s vertex coloring to (100.00%, 100.00%, 100.00%) with (Real(SBTransparency[SBArray]))% transparency
                  • Set SBTransparency[SBArray] = (SBTransparency[SBArray] + SBTransparencyRate)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ID2 Equal to 0
            • Then - Actions
              • Trigger - Turn off (This trigger)
            • Else - Actions
  • SB Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Spinning Axe
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ID2 Equal to 0
        • Then - Actions
          • Trigger - Turn on SB Loop <gen>
        • Else - Actions
      • Set ID2 = (ID2 + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ID2 Greater than IDMax
        • Then - Actions
          • Set ID[ID2] = ID2
          • Set IDMax = ID2
        • Else - Actions
      • Set SBArray = ID[ID2]
      • Set SBCaster[SBArray] = (Triggering unit)
      • Set SBCasterPos[SBArray] = (Position of SBCaster[SBArray])
      • Set SBLevel[SBArray] = (Level of Spinning Axe for SBCaster[SBArray])
      • Set SBPoint[SBArray] = (Target point of ability being cast)
      • Set SBAngle[SBArray] = (Angle from SBCasterPos[SBArray] to SBPoint[SBArray])
      • Set SBDistance[SBArray] = 0
      • Set SBTransparency[SBArray] = 0
      • -------- --------------------- VALUES THAT CAN BE CHANGED --------------------- --------
      • -------- SBMaxDistance = the max distance the blade can travel. In this case - 300 + 300 x Level of Spinning Blade. --------
      • Set SBMaxDistance[SBArray] = (300 + (SBLevel[SBArray] x 150))
      • -------- SBBladeSpeed = the speed of the blade. Bigger value = greater speed. --------
      • Set SBBladeSpeed = 25.00
      • -------- SBRadius = the radius from the center of the blade till the end of it in which enemies take damage. --------
      • Set SBRadius = 75.00
      • -------- SBDamage - the damage each cutted enemy takes. 'Spell_Level x 50' in this case. --------
      • Set SBDamage = ((Real(SBLevel[SBArray])) x 65.00)
      • -------- SBTransparencyRate = the rate at which the blades fade. Greater value = faster fading. (i recommend values below 25) --------
      • -------- Take note that the distance traveled while the blades are fading is additional to the SBMaxDistance value! => More fading time = bigger distance --------
      • Set SBTransparencyRate = 10
      • -------- --------------------- VALUES THAT CAN BE CHANGED --------------------- --------
      • Unit - Create 1 Spinning Blade for (Owner of SBCaster[SBArray]) at SBCasterPos[SBArray] facing Default building facing degrees
      • Set SBBlade[SBArray] = (Last created unit)
      • Custom script: set udg_SBUnitGroupDamaged[udg_SBArray] = CreateGroup()
      • Animation - Change SBBlade[SBArray] flying height to 40.00 at 0.00
      • Custom script: call RemoveLocation(udg_SBCasterPos[udg_SBArray])
      • Custom script: call RemoveLocation(udg_SBPoint[udg_SBArray])
  • Player 1 Absent
    • Events
      • Time - Every 1.98 seconds of game time
    • Conditions
      • ((Player 1 (Red) controller) Equal to Computer) or (((Player 1 (Red) controller) Equal to None) or ((Player 1 (Red) slot status) Not equal to Is playing))
    • Actions
      • Trigger - Turn off (This trigger)
      • Game - Grant shared vision and full shared unit control of Player 1 (Red) units with his/her allies
  • Leavers Gold
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Set NotPlaying = (All players matching ((((Matching player) is an ally of Player 1 (Red)) Equal to True) and (((Matching player) slot status) Not equal to Is playing)))
      • For each (Integer B) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Player((Integer B))) is in NotPlaying) Equal to True
            • Then - Actions
              • Player Group - Pick every player in (All players matching ((((Matching player) is an ally of Player 1 (Red)) Equal to True) and (((Matching player) is in NotPlaying) Equal to False))) and do (Actions)
                • Loop - Actions
                  • Player - Add (((Player((Integer B))) Current gold) / (9 - (Number of players in NotPlaying))) to (Picked player) Current gold
            • Else - Actions
      • Player Group - Pick every player in NotPlaying and do (Player - Set (Picked player) Current gold to 0)
      • Custom script: call DestroyForce (udg_NotPlaying)
Second thing am i using pan camera there? if yes then how do i change it i need to use it to show cut scene to players, if it causes desync and theres other way show me it please. also can wait function lead to bugs if yes how to get rid off it

  • Rohan soldier out Copy Copy 2 Copy 2
    • Events
      • Unit - Mordor Orc 0628 <gen> Dies
    • Conditions
    • Actions
      • Unit - Remove Rohirrim 0400 <gen> from the game
      • Unit - Remove Rohirrim 0122 <gen> from the game
      • Unit - Remove Rohirrim 0020 <gen> from the game
      • Unit - Remove Rohirrim 0113 <gen> from the game
      • Unit - Move Merry 0008 <gen> instantly to CenterLetsRide1, facing 0.00 degrees
      • Unit - Make Theoden 0139 <gen> Invulnerable
      • Unit - Make Gandalf the White 0099 <gen> Invulnerable
      • Unit - Make Pippin 0009 <gen> Invulnerable
      • Trigger - Turn off AttackMinas2 <gen>
      • Trigger - Turn off AttackMinas <gen>
      • Set TempGroup = (Units in MinasTirith <gen>)
      • Unit Group - Pick every unit in TempGroup and do (Unit - Pause (Picked unit))
      • Custom script: call DestroyGroup (udg_TempGroup)
      • Unit - Create 40 Mordor Orc Warrior for Neutral Hostile at ReinforcementsMinasCenter1 facing 180.00 degrees
      • Unit - Create 40 Mordor Orc Warrior for Neutral Hostile at ReinforcementsMinasCenter2 facing 180.00 degrees
      • Unit - Create 40 Mordor Orc Warrior for Neutral Hostile at ReinforcementsMinasCenter3 facing 180.00 degrees
      • Unit - Create 12 Rohirrim for Player 10 (Light Blue) at CenterLetsRide1 facing 0.00 degrees
      • Set Rohirrims1 = (Last created unit group)
      • Unit - Create 12 Rohirrim for Player 10 (Light Blue) at CenterLetsRide2 facing 0.00 degrees
      • Set Rohirrims2 = (Last created unit group)
      • Unit - Create 12 Rohirrim for Player 10 (Light Blue) at CenterLetsRide3 facing 0.00 degrees
      • Set Rohirrims3 = (Last created unit group)
      • Unit - Create 12 Rohirrim for Player 10 (Light Blue) at CenterLetsRide4 facing 0.00 degrees
      • Set Rohirrims4 = (Last created unit group)
      • Unit - Create 12 Rohirrim for Player 10 (Light Blue) at CenterLetsRide5 facing 0.00 degrees
      • Set Rohirrims5 = (Last created unit group)
      • Unit - Create 12 Rohirrim for Player 10 (Light Blue) at CenterLetsRide6 facing 0.00 degrees
      • Set Rohirrims6 = (Last created unit group)
      • Unit - Create 1 Eomer for Player 10 (Light Blue) at (Center of Eomer <gen>) facing 0.00 degrees
      • Set EomerOnHorse = (Last created unit)
      • Unit - Create 1 Gamling for Player 10 (Light Blue) at (Center of Gamling <gen>) facing 0.00 degrees
      • Set GamlingOnHorse = (Last created unit)
      • Unit - Create 1 Theoden for Player 10 (Light Blue) at (Center of Theoden <gen>) facing 0.00 degrees
      • Set TheodenOnHorse = (Last created unit)
      • Cinematic - Disable user control for Player Group - Player 3 (Teal)
      • Cinematic - Disable user control for Player Group - Player 4 (Purple)
      • Cinematic - Disable user control for Player Group - Player 5 (Yellow)
      • Cinematic - Disable user control for Player Group - Player 9 (Gray)
      • Cinematic - Turn cinematic mode On for Player Group - Player 3 (Teal)
      • Cinematic - Turn cinematic mode On for Player Group - Player 4 (Purple)
      • Cinematic - Turn cinematic mode On for Player Group - Player 5 (Yellow)
      • Cinematic - Turn cinematic mode On for Player Group - Player 9 (Gray)
      • Camera - Apply Rohan Charge 1 <gen> for Player 3 (Teal) over 0.00 seconds
      • Camera - Apply Rohan Charge 1 <gen> for Player 4 (Purple) over 0.00 seconds
      • Camera - Apply Rohan Charge 1 <gen> for Player 5 (Yellow) over 0.00 seconds
      • Camera - Apply Rohan Charge 1 <gen> for Player 9 (Gray) over 0.00 seconds
      • Cinematic - Send transmission to Player Group - Player 3 (Teal) from a Player 10 (Light Blue) Theoden named Théoden at (Center of (Playable map area)): Play No sound and display . Modify duration: Set to 68.00 seconds and Don't wait
      • Cinematic - Send transmission to Player Group - Player 4 (Purple) from a Player 10 (Light Blue) Theoden named Théoden at (Center of (Playable map area)): Play No sound and display . Modify duration: Set to 68.00 seconds and Don't wait
      • Cinematic - Send transmission to Player Group - Player 5 (Yellow) from a Player 10 (Light Blue) Theoden named Théoden at (Center of (Playable map area)): Play No sound and display . Modify duration: Set to 68.00 seconds and Don't wait
      • Cinematic - Send transmission to Player Group - Player 9 (Gray) from a Player 10 (Light Blue) Theoden named Théoden at (Center of (Playable map area)): Play No sound and display . Modify duration: Set to 68.00 seconds and Don't wait
      • Sound - Set music volume to 10.00%
      • Sound - Play RohanCharge1 <gen>
      • Wait 5.00 seconds
      • Unit - Order TheodenOnHorse to Patrol To (Center of Eomer <gen>)
      • Wait 10.00 seconds
      • Unit - Order TheodenOnHorse to Patrol To (Center of Eomer <gen>)
      • Wait 10.00 seconds
      • Unit - Order TheodenOnHorse to Patrol To (Center of Eomer <gen>)
      • Wait 10.00 seconds
      • Unit - Order TheodenOnHorse to Patrol To (Center of Eomer <gen>)
      • Wait 10.00 seconds
      • Custom script: call SetUnitAnimationByIndex(udg_TheodenOnHorse, 3)
      • Wait 1.50 seconds
      • Custom script: call SetUnitAnimationByIndex(udg_EomerOnHorse, 3)
      • Custom script: call SetUnitAnimationByIndex(udg_GamlingOnHorse, 3)
      • Unit Group - Pick every unit in Rohirrims1 and do (Actions)
        • Loop - Actions
          • Custom script: call SetUnitAnimationByIndex(GetEnumUnit(), 3)
      • Unit Group - Pick every unit in Rohirrims2 and do (Actions)
        • Loop - Actions
          • Custom script: call SetUnitAnimationByIndex(GetEnumUnit(), 3)
      • Unit Group - Pick every unit in Rohirrims3 and do (Actions)
        • Loop - Actions
          • Custom script: call SetUnitAnimationByIndex(GetEnumUnit(), 3)
      • Unit Group - Pick every unit in Rohirrims4 and do (Actions)
        • Loop - Actions
          • Custom script: call SetUnitAnimationByIndex(GetEnumUnit(), 3)
      • Unit Group - Pick every unit in Rohirrims5 and do (Actions)
        • Loop - Actions
          • Custom script: call SetUnitAnimationByIndex(GetEnumUnit(), 3)
      • Unit Group - Pick every unit in Rohirrims6 and do (Actions)
        • Loop - Actions
          • Custom script: call SetUnitAnimationByIndex(GetEnumUnit(), 3)
      • Wait 18.00 seconds
      • Custom script: call SetUnitAnimationByIndex(udg_TheodenOnHorse, 1)
      • Custom script: call SetUnitAnimationByIndex(udg_EomerOnHorse, 1)
      • Custom script: call SetUnitAnimationByIndex(udg_GamlingOnHorse, 1)
      • Unit Group - Pick every unit in Rohirrims1 and do (Actions)
        • Loop - Actions
          • Custom script: call SetUnitAnimationByIndex(GetEnumUnit(), 1)
      • Unit Group - Pick every unit in Rohirrims2 and do (Actions)
        • Loop - Actions
          • Custom script: call SetUnitAnimationByIndex(GetEnumUnit(), 1)
      • Unit Group - Pick every unit in Rohirrims3 and do (Actions)
        • Loop - Actions
          • Custom script: call SetUnitAnimationByIndex(GetEnumUnit(), 1)
      • Unit Group - Pick every unit in Rohirrims4 and do (Actions)
        • Loop - Actions
          • Custom script: call SetUnitAnimationByIndex(GetEnumUnit(), 1)
      • Unit Group - Pick every unit in Rohirrims5 and do (Actions)
        • Loop - Actions
          • Custom script: call SetUnitAnimationByIndex(GetEnumUnit(), 1)
      • Unit Group - Pick every unit in Rohirrims6 and do (Actions)
        • Loop - Actions
          • Custom script: call SetUnitAnimationByIndex(GetEnumUnit(), 1)
      • Camera - Apply Rohan Charge 2 <gen> for Player 3 (Teal) over 7.00 seconds
      • Camera - Apply Rohan Charge 2 <gen> for Player 4 (Purple) over 7.00 seconds
      • Camera - Apply Rohan Charge 2 <gen> for Player 5 (Yellow) over 7.00 seconds
      • Camera - Apply Rohan Charge 2 <gen> for Player 9 (Gray) over 7.00 seconds
      • Wait 10.00 seconds
      • Trigger - Turn on AttackMinas <gen>
      • Trigger - Turn on AttackMinas2 <gen>
      • Wait 5.00 seconds
      • Unit - Order EomerOnHorse to Attack-Move To ArmyMinasCenter
      • Unit - Order GamlingOnHorse to Attack-Move To ArmyMinasCenter
      • Unit - Order TheodenOnHorse to Attack-Move To ArmyMinasCenter
      • Unit - Order Merry 0008 <gen> to Attack-Move To (Center of Move Merry <gen>)
      • Unit Group - Order Rohirrims1 to Attack-Move To ArmyMinasCenter
      • Unit Group - Order Rohirrims2 to Attack-Move To ArmyMinasCenter
      • Unit Group - Order Rohirrims3 to Attack-Move To ArmyMinasCenter
      • Unit Group - Order Rohirrims4 to Attack-Move To ArmyMinasCenter
      • Unit Group - Order Rohirrims5 to Attack-Move To ArmyMinasCenter
      • Unit Group - Order Rohirrims6 to Attack-Move To ArmyMinasCenter
      • Camera - Apply Rohan Charge 3 <gen> for Player 3 (Teal) over 12.00 seconds
      • Camera - Apply Rohan Charge 3 <gen> for Player 4 (Purple) over 12.00 seconds
      • Camera - Apply Rohan Charge 3 <gen> for Player 5 (Yellow) over 12.00 seconds
      • Camera - Apply Rohan Charge 3 <gen> for Player 9 (Gray) over 12.00 seconds
      • Wait 12.00 seconds
      • Cinematic - Turn cinematic mode Off for Player Group - Player 3 (Teal)
      • Cinematic - Turn cinematic mode Off for Player Group - Player 4 (Purple)
      • Cinematic - Turn cinematic mode Off for Player Group - Player 5 (Yellow)
      • Cinematic - Turn cinematic mode Off for Player Group - Player 9 (Gray)
      • Cinematic - Enable user control for Player Group - Player 3 (Teal)
      • Cinematic - Enable user control for Player Group - Player 4 (Purple)
      • Cinematic - Enable user control for Player Group - Player 5 (Yellow)
      • Cinematic - Enable user control for Player Group - Player 9 (Gray)
      • Camera - Reset camera for Player 3 (Teal) to standard game-view over 0.00 seconds
      • Camera - Reset camera for Player 4 (Purple) to standard game-view over 0.00 seconds
      • Camera - Reset camera for Player 5 (Yellow) to standard game-view over 0.00 seconds
      • Camera - Reset camera for Player 9 (Gray) to standard game-view over 0.00 seconds
      • Destructible - Kill Rock Chunks 19156 <gen>
      • Sound - Set music volume to 100.00%
      • Unit - Remove TheodenOnHorse from the game
      • Unit - Make Theoden 0139 <gen> Vulnerable
      • Unit - Make Gandalf the White 0099 <gen> Vulnerable
      • Unit - Make Pippin 0009 <gen> Vulnerable
      • Unit - Move Theoden 0139 <gen> instantly to (Center of Move Merry <gen>), facing 0.00 degrees
      • Set TempGroup = (Units in MinasTirith <gen>)
      • Unit Group - Pick every unit in TempGroup and do (Unit - Unpause (Picked unit))
      • Custom script: call DestroyGroup (udg_TempGroup)
      • Wait 30.00 seconds
      • Sound - Play Mumakils <gen>
      • Unit - Create 1 Mumakil for Player 7 (Green) at (Center of Mumak1 <gen>) facing 180.00 degrees
      • Unit - Create 1 Mumakil for Player 7 (Green) at (Center of Mumak2 <gen>) facing 180.00 degrees
      • Unit - Create 1 Mumakil for Player 7 (Green) at (Center of Mumak3 <gen>) facing 180.00 degrees
      • Unit - Create 1 Mumakil for Player 7 (Green) at (Center of Mumak4 <gen>) facing 180.00 degrees
      • Unit - Create 1 Mumakil for Player 7 (Green) at (Center of Mumak5 <gen>) facing 180.00 degrees
      • Unit - Create 1 Mumakil for Player 7 (Green) at (Center of Mumak6 <gen>) facing 180.00 degrees
      • Set Mumaks = (Units of type Mumakil)
      • Unit Group - Pick every unit in Mumaks and do (Actions)
        • Loop - Actions
          • Set TempLoc = (Position of (Picked unit))
          • Unit - Order (Picked unit) to Attack-Move To (TempLoc offset by 6000.00 towards 180.00 degrees)
          • Custom script: call RemoveLocation (udg_TempLoc)
      • Trigger - Turn on ChargeRohirims <gen>
      • Wait 51.00 seconds
      • Trigger - Turn off ChargeRohirims <gen>
      • Trigger - Turn on ChargeRohirims 2 <gen>
      • Custom script: call DestroyTrigger( GetTriggeringTrigger() )
      • Trigger - Turn off (This trigger)
 
Level 11
Joined
Jul 4, 2016
Messages
627
You don't need to disable or enable user control if you do cinematic mode. Also every center of x region is a point leak. You can use timers instead of waits. However, I suppose since its a cinematic, waits are fine.

You should use your own variable for the integer loop in NotPlaying.
 
Last edited:
Status
Not open for further replies.
Top