• 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] Bloated save file size (finally found trigger)

Status
Not open for further replies.
After long time I finally found out which trigger was causing so much save file size and time to save. Probably is a leak in thes trigger, but I can't find it.

  • regroup
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to BattallionLimit, do (Actions)
        • Loop - Actions
          • //Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in Battallion[(Integer A)] and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Unit-type of (Picked unit)) Equal to RiflemanCaptain
                      • (Unit-type of (Picked unit)) Equal to InfantryCaptain
                      • (Unit-type of (Picked unit)) Equal to KnightCaptein
                      • (Unit-type of (Picked unit)) Equal to OutriderCaptein
                      • (Unit-type of (Picked unit)) Equal to AlchemistCaptein
                      • (Unit-type of (Picked unit)) Equal to ZombieLord
                      • (Unit-type of (Picked unit)) Equal to SniperCaptain
                • Then - Actions
                  • -------- add unit captains to condition above --------
                  • Set TempCommander = (Picked unit)
                  • Set Temppoint = (Position of TempCommander)
                • Else - Actions
          • //Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in Battallion[(Integer A)] and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Unit-type of (Picked unit)) Equal to Riflemen
                      • (Unit-type of (Picked unit)) Equal to Infantry
                      • (Unit-type of (Picked unit)) Equal to Knight
                      • (Unit-type of (Picked unit)) Equal to Outrider
                      • (Unit-type of (Picked unit)) Equal to Alchemist
                      • (Unit-type of (Picked unit)) Equal to Zombie
                      • (Unit-type of (Picked unit)) Equal to Sniper
                • Then - Actions
                  • -------- add unit types to condition above --------
                  • Set Temppoint01 = (Position of (Picked unit))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Distance between Temppoint and Temppoint01) Greater than or equal to BattallionRegroup
                    • Then - Actions
                      • Unit - Order (Picked unit) to Right-Click TempCommander
                    • Else - Actions
                • Else - Actions
          • Custom script: call RemoveLocation(udg_Temppoint)
          • Custom script: call RemoveLocation(udg_Temppoint01)
That wantdestroygroup is now disabled actually as it clears the battalion variable.
 
Status
Not open for further replies.
Top