Map Crashing

Azlier

Old World Ghost
Reaction score
461
No! Destroy the group before each time you set it to something, except the one at the top of the trigger.

Set BuffGroup = (Units in (Entire map) matching (((Matching unit) has buff Polymorph Cannon ) Equal to True))

Leaks unless you destroy the group first, then set the variable.
 

Laiev

Hey Listen!!
Reaction score
188
@Xebarsis

I'm not sure but I think you need to destroy unit group before make other in the same variable, no?

You use the BuffGroup 7 times, and just destroy one.
Try to destroy it every time when you will make a new with the same variable and test it again.

Also... I check it with LeakCheck and he show me something strange..

RandomInteger : (Line: 72) Location - Removed: No
Trigger:
  • Set RandomInteger = (Random integer number between 1 and 15)


/\ or that program is crazy or this is location?


EDIT: Azlier more fast lol
 

Xebarsis

New Member
Reaction score
7
No! Destroy the group before each time you set it to something, except the one at the top of the trigger.

Set BuffGroup = (Units in (Entire map) matching (((Matching unit) has buff Polymorph Cannon ) Equal to True))

Leaks unless you destroy the group first, then set the variable.

Okay I think I see what you mean now, would this be right?

Trigger:
  • Universal Buff Checker
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Set BuffGroup = (Units in (Entire map) matching (((Matching unit) has buff Sludge Bomb ) Equal to True))
      • Unit Group - Pick every unit in BuffGroup and do (Actions)
        • Loop - Actions
          • Unit - Remove Sludge Bomb buff from (Picked unit)
          • Set TheOtherPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy Caster for Neutral Extra at TheOtherPoint facing Default building facing degrees
          • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Cripple (Neutral Hostile) to (Last created unit)
          • Unit - Add Stun (Neutral Hostile) to (Last created unit)
          • Unit - Order (Last created unit) to Neutral - Firebolt (Picked unit)
          • Unit - Order (Last created unit) to Undead Necromancer - Cripple (Picked unit)
          • Custom script: call RemoveLocation (udg_TheOtherPoint)
      • Custom script: call DestroyGroup (udg_BuffGroup)
      • Set BuffGroup = (Units in (Entire map) matching (((Matching unit) has buff Polymorph Cannon ) Equal to True))
      • Unit Group - Pick every unit in BuffGroup and do (Actions)
        • Loop - Actions
          • Unit - Remove Polymorph Cannon buff from (Picked unit)
          • Set TheOtherPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy Caster for Neutral Extra at TheOtherPoint facing Default building facing degrees
          • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Hex (Polymorph Cannon) to (Last created unit)
          • Unit - Set level of Hex (Polymorph Cannon) for (Last created unit) to 3
          • Unit - Order (Last created unit) to Orc Shadow Hunter - Hex (Picked unit)
          • Custom script: call RemoveLocation (udg_TheOtherPoint)
      • Custom script: call DestroyGroup (udg_BuffGroup)
      • Set BuffGroup = (Units in (Entire map) matching (((Matching unit) has buff Ice Comet ) Equal to True))
      • Unit Group - Pick every unit in BuffGroup and do (Actions)
        • Loop - Actions
          • Unit - Remove Ice Comet buff from (Picked unit)
          • Set TheOtherPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy Caster for Neutral Extra at TheOtherPoint facing Default building facing degrees
          • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Freezing Shard (Ice Comet) to (Last created unit)
          • Unit - Order (Last created unit) to Neutral - Firebolt (Picked unit)
          • Custom script: call RemoveLocation (udg_TheOtherPoint)
      • Custom script: call DestroyGroup (udg_BuffGroup)
      • Set BuffGroup = (Units in (Entire map) matching (((Matching unit) has buff Explosive Shot (Non-stacking)) Equal to True))
      • Unit Group - Pick every unit in BuffGroup and do (Actions)
        • Loop - Actions
          • Unit - Remove Explosive Shot (Non-stacking) buff from (Picked unit)
          • Set ThePoint = (Position of (Picked unit))
          • Special Effect - Create a special effect at ThePoint using Abilities\Spells\Other\Doom\DoomDeath.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation (udg_ThePoint)
      • Custom script: call DestroyGroup (udg_BuffGroup)
      • Set BuffGroup = (Units in (Entire map) matching (((Matching unit) has buff Wing Shred (Non-stacking)) Equal to True))
      • Unit Group - Pick every unit in BuffGroup and do (Actions)
        • Loop - Actions
          • Unit - Remove Wing Shred (Non-stacking) buff from (Picked unit)
          • Set ThePoint = (Position of (Picked unit))
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\HeroBloodElfBlood.mdl
          • Special Effect - Destroy (Last created special effect)
          • Sound - Play MetalHeavySliceFlesh1 <gen> at 100.00% volume, located at ThePoint with Z offset 0.00
          • Custom script: call RemoveLocation (udg_ThePoint)
      • Custom script: call DestroyGroup (udg_BuffGroup)
      • Set BuffGroup = (Units in (Entire map) matching (((Matching unit) has buff Stunned (Holy Hammer)) Equal to True))
      • Unit Group - Pick every unit in BuffGroup and do (Actions)
        • Loop - Actions
          • Unit - Remove Stunned (Holy Hammer) buff from (Picked unit)
          • Set TheOtherPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy Caster for Neutral Extra at TheOtherPoint facing Default building facing degrees
          • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Holy Light (Holy Hammer) to (Last created unit)
          • Unit - Add Stun (Neutral Hostile) to (Last created unit)
          • Unit - Order (Last created unit) to Neutral - Firebolt (Picked unit)
          • Unit - Order (Last created unit) to Human Paladin - Holy Light (Picked unit)
          • Custom script: call RemoveLocation (udg_TheOtherPoint)
      • Custom script: call DestroyGroup (udg_BuffGroup)
      • Set BuffGroup = (Units in (Entire map) matching (((Matching unit) has buff Mangle (Remove)) Equal to True))
      • Unit Group - Pick every unit in BuffGroup and do (Actions)
        • Loop - Actions
          • Unit - Remove Mangle (Remove) buff from (Picked unit)
          • Set RandomInteger = (Random integer number between 1 and 15)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RandomInteger Equal to 15
            • Then - Actions
              • Set TheOtherPoint = (Position of (Picked unit))
              • Unit - Create 1 Dummy Caster for Neutral Extra at TheOtherPoint facing Default building facing degrees
              • Unit - Add Slow (Mangle) to (Last created unit)
              • Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
              • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
              • Custom script: call RemoveLocation (udg_TheOtherPoint)
            • Else - Actions
      • Custom script: call DestroyGroup (udg_BuffGroup)
 

Xebarsis

New Member
Reaction score
7
Alright, I will test it out and see if the game crashes. The game would consistently crash at 3090 seconds in, which is 51 minutes. So, in 51 minutes I'll post on this thread.
 

Xebarsis

New Member
Reaction score
7
Your trigger run 5 times per sec, so, in 51 minutes of game, your trigger has running, hmm, something like 618 times, set'ing unit group without destroying it.

Wouldn't that be 3090 x 5 = 15450 times?
 

Azlier

Old World Ghost
Reaction score
461
765000 is how many groups you'll leak in 51 minutes, I calculate.
 

Azlier

Old World Ghost
Reaction score
461
Leaking 5 groups per trigger execution.

5 * 153000 = 765000
 

Laiev

Hey Listen!!
Reaction score
188
ok ok ok, much much leak in one trigger in so little period time in game (51 minutes is little period time lol? w/e).
 

Xebarsis

New Member
Reaction score
7
The game is currently at 3150 seconds and hasn't crashed.. this is good news. I'm going to let it run longer and see if it crashes later. I'm really excited!
 

Xebarsis

New Member
Reaction score
7
Ah crap! The game crashed at 4625, so it added 25 minutes to the original time. I know the map crashes a lot sooner with multiple players, so 25 minutes isn't too significant, but it's definitely a start! Other than making the trigger check for buffs less often, is there anything else I can do to this trigger to possibly eliminate or significantly increase the time it takes for a crash to occur?

Once again, here's the trigger:
Trigger:
  • Universal Buff Checker
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Set BuffGroup = (Units in (Entire map) matching (((Matching unit) has buff Sludge Bomb ) Equal to True))
      • Unit Group - Pick every unit in BuffGroup and do (Actions)
        • Loop - Actions
          • Unit - Remove Sludge Bomb buff from (Picked unit)
          • Set TheOtherPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy Caster for Neutral Extra at TheOtherPoint facing Default building facing degrees
          • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Cripple (Neutral Hostile) to (Last created unit)
          • Unit - Add Stun (Neutral Hostile) to (Last created unit)
          • Unit - Order (Last created unit) to Neutral - Firebolt (Picked unit)
          • Unit - Order (Last created unit) to Undead Necromancer - Cripple (Picked unit)
          • Custom script: call RemoveLocation (udg_TheOtherPoint)
      • Custom script: call DestroyGroup (udg_BuffGroup)
      • Set BuffGroup = (Units in (Entire map) matching (((Matching unit) has buff Polymorph Cannon ) Equal to True))
      • Unit Group - Pick every unit in BuffGroup and do (Actions)
        • Loop - Actions
          • Unit - Remove Polymorph Cannon buff from (Picked unit)
          • Set TheOtherPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy Caster for Neutral Extra at TheOtherPoint facing Default building facing degrees
          • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Hex (Polymorph Cannon) to (Last created unit)
          • Unit - Set level of Hex (Polymorph Cannon) for (Last created unit) to 3
          • Unit - Order (Last created unit) to Orc Shadow Hunter - Hex (Picked unit)
          • Custom script: call RemoveLocation (udg_TheOtherPoint)
      • Custom script: call DestroyGroup (udg_BuffGroup)
      • Set BuffGroup = (Units in (Entire map) matching (((Matching unit) has buff Ice Comet ) Equal to True))
      • Unit Group - Pick every unit in BuffGroup and do (Actions)
        • Loop - Actions
          • Unit - Remove Ice Comet buff from (Picked unit)
          • Set TheOtherPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy Caster for Neutral Extra at TheOtherPoint facing Default building facing degrees
          • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Freezing Shard (Ice Comet) to (Last created unit)
          • Unit - Order (Last created unit) to Neutral - Firebolt (Picked unit)
          • Custom script: call RemoveLocation (udg_TheOtherPoint)
      • Custom script: call DestroyGroup (udg_BuffGroup)
      • Set BuffGroup = (Units in (Entire map) matching (((Matching unit) has buff Explosive Shot (Non-stacking)) Equal to True))
      • Unit Group - Pick every unit in BuffGroup and do (Actions)
        • Loop - Actions
          • Unit - Remove Explosive Shot (Non-stacking) buff from (Picked unit)
          • Set ThePoint = (Position of (Picked unit))
          • Special Effect - Create a special effect at ThePoint using Abilities\Spells\Other\Doom\DoomDeath.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation (udg_ThePoint)
      • Custom script: call DestroyGroup (udg_BuffGroup)
      • Set BuffGroup = (Units in (Entire map) matching (((Matching unit) has buff Wing Shred (Non-stacking)) Equal to True))
      • Unit Group - Pick every unit in BuffGroup and do (Actions)
        • Loop - Actions
          • Unit - Remove Wing Shred (Non-stacking) buff from (Picked unit)
          • Set ThePoint = (Position of (Picked unit))
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\HeroBloodElfBlood.mdl
          • Special Effect - Destroy (Last created special effect)
          • Sound - Play MetalHeavySliceFlesh1 <gen> at 100.00% volume, located at ThePoint with Z offset 0.00
          • Custom script: call RemoveLocation (udg_ThePoint)
      • Custom script: call DestroyGroup (udg_BuffGroup)
      • Set BuffGroup = (Units in (Entire map) matching (((Matching unit) has buff Stunned (Holy Hammer)) Equal to True))
      • Unit Group - Pick every unit in BuffGroup and do (Actions)
        • Loop - Actions
          • Unit - Remove Stunned (Holy Hammer) buff from (Picked unit)
          • Set TheOtherPoint = (Position of (Picked unit))
          • Unit - Create 1 Dummy Caster for Neutral Extra at TheOtherPoint facing Default building facing degrees
          • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
          • Unit - Add Holy Light (Holy Hammer) to (Last created unit)
          • Unit - Add Stun (Neutral Hostile) to (Last created unit)
          • Unit - Order (Last created unit) to Neutral - Firebolt (Picked unit)
          • Unit - Order (Last created unit) to Human Paladin - Holy Light (Picked unit)
          • Custom script: call RemoveLocation (udg_TheOtherPoint)
      • Custom script: call DestroyGroup (udg_BuffGroup)
      • Set BuffGroup = (Units in (Entire map) matching (((Matching unit) has buff Mangle (Remove)) Equal to True))
      • Unit Group - Pick every unit in BuffGroup and do (Actions)
        • Loop - Actions
          • Unit - Remove Mangle (Remove) buff from (Picked unit)
          • Set RandomInteger = (Random integer number between 1 and 15)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RandomInteger Equal to 15
            • Then - Actions
              • Set TheOtherPoint = (Position of (Picked unit))
              • Unit - Create 1 Dummy Caster for Neutral Extra at TheOtherPoint facing Default building facing degrees
              • Unit - Add Slow (Mangle) to (Last created unit)
              • Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
              • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
              • Custom script: call RemoveLocation (udg_TheOtherPoint)
            • Else - Actions
      • Custom script: call DestroyGroup (udg_BuffGroup)


Sorry it takes so much space :p I tried to add the spoiler tags around it but it didn't work. Also note that with the trigger completely disabled I have had the game run for more than 9500 seconds, it could have kept going longer but I haven't had the patience nor the need to test it beyond that duration.
 

Laiev

Hey Listen!!
Reaction score
188
I got a stupid question, why you don't make both unit group variable and use array to don't repeat it?
Maybe it don't make any sh*t, but using other variable maybe get more time to you.

Why you can't increase the event time?

You can improve it I think.

Something like this:


Trigger:
  • Event - Every 0,10 seconds of the game time
    • If - ~~~~
    • Actions -
      • Set Variable = (Units in (Entire map)
      • Pick every unit in Variable and do actions
        • If
          • (Triggering unit) has buff X equal to true
        • Then
          • Create dummy, etc...


Using it you can improve a lot of that trigger.
If you need, create a new map and copy that trigger to the new and post here. Then I edit it to you see how It will be.
 

Xebarsis

New Member
Reaction score
7
Alright, I rewrote the trigger in the way I believe you were describing. I'm going to keep the seconds at .02 so I can have an accurate comparison between the two. I'm going to leave my map on overnight and see what happens.

Trigger:
  • Universal Buff Checker
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Set BuffGroup = (Units in (Playable map area))
      • Unit Group - Pick every unit in BuffGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Sludge Bomb ) Equal to True
            • Then - Actions
              • Unit - Remove Sludge Bomb buff from (Picked unit)
              • Set TheOtherPoint = (Position of (Picked unit))
              • Unit - Create 1 Dummy Caster for Neutral Extra at TheOtherPoint facing Default building facing degrees
              • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
              • Unit - Add Cripple (Neutral Hostile) to (Last created unit)
              • Unit - Add Stun (Neutral Hostile) to (Last created unit)
              • Unit - Order (Last created unit) to Neutral - Firebolt (Picked unit)
              • Unit - Order (Last created unit) to Undead Necromancer - Cripple (Picked unit)
              • Custom script: call RemoveLocation (udg_TheOtherPoint)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Polymorph Cannon ) Equal to True
            • Then - Actions
              • Unit - Remove Polymorph Cannon buff from (Picked unit)
              • Set TheOtherPoint = (Position of (Picked unit))
              • Unit - Create 1 Dummy Caster for Neutral Extra at TheOtherPoint facing Default building facing degrees
              • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
              • Unit - Add Hex (Polymorph Cannon) to (Last created unit)
              • Unit - Set level of Hex (Polymorph Cannon) for (Last created unit) to 3
              • Unit - Order (Last created unit) to Orc Shadow Hunter - Hex (Picked unit)
              • Custom script: call RemoveLocation (udg_TheOtherPoint)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Ice Comet ) Equal to True
            • Then - Actions
              • Unit - Remove Ice Comet buff from (Picked unit)
              • Set TheOtherPoint = (Position of (Picked unit))
              • Unit - Create 1 Dummy Caster for Neutral Extra at TheOtherPoint facing Default building facing degrees
              • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
              • Unit - Add Freezing Shard (Ice Comet) to (Last created unit)
              • Unit - Order (Last created unit) to Neutral - Firebolt (Picked unit)
              • Custom script: call RemoveLocation (udg_TheOtherPoint)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Explosive Shot (Non-stacking)) Equal to True
            • Then - Actions
              • Unit - Remove Explosive Shot (Non-stacking) buff from (Picked unit)
              • Set ThePoint = (Position of (Picked unit))
              • Special Effect - Create a special effect at ThePoint using Abilities\Spells\Other\Doom\DoomDeath.mdl
              • Special Effect - Destroy (Last created special effect)
              • Custom script: call RemoveLocation (udg_ThePoint)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Wing Shred (Non-stacking)) Equal to True
            • Then - Actions
              • Unit - Remove Wing Shred (Non-stacking) buff from (Picked unit)
              • Set ThePoint = (Position of (Picked unit))
              • Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\HeroBloodElfBlood.mdl
              • Special Effect - Destroy (Last created special effect)
              • Sound - Play MetalHeavySliceFlesh1 <gen> at 100.00% volume, located at ThePoint with Z offset 0.00
              • Custom script: call RemoveLocation (udg_ThePoint)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Stunned (Holy Hammer)) Equal to True
            • Then - Actions
              • Unit - Remove Stunned (Holy Hammer) buff from (Picked unit)
              • Set TheOtherPoint = (Position of (Picked unit))
              • Unit - Create 1 Dummy Caster for Neutral Extra at TheOtherPoint facing Default building facing degrees
              • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
              • Unit - Add Holy Light (Holy Hammer) to (Last created unit)
              • Unit - Add Stun (Neutral Hostile) to (Last created unit)
              • Unit - Order (Last created unit) to Neutral - Firebolt (Picked unit)
              • Unit - Order (Last created unit) to Human Paladin - Holy Light (Picked unit)
              • Custom script: call RemoveLocation (udg_TheOtherPoint)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Mangle (Remove)) Equal to True
            • Then - Actions
              • Unit - Remove Mangle (Remove) buff from (Picked unit)
              • Set RandomInteger = (Random integer number between 1 and 15)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RandomInteger Equal to 15
                • Then - Actions
                  • Set TheOtherPoint = (Position of (Picked unit))
                  • Unit - Create 1 Dummy Caster for Neutral Extra at TheOtherPoint facing Default building facing degrees
                  • Unit - Add Slow (Mangle) to (Last created unit)
                  • Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
                  • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
                  • Custom script: call RemoveLocation (udg_TheOtherPoint)
                • Else - Actions
            • Else - Actions
      • Custom script: call DestroyGroup (udg_BuffGroup)
 

Xebarsis

New Member
Reaction score
7
Gj.
Good lucky to don't crash it.

Even with the trigger running every .02 seconds, I achieved 27349 seconds; SEVEN AND A HALF HOURS!! That's including other triggers that are running in my map and spawning other things! Spawned objects were scattered all over the map that players weren't around to pick up, so potentially the game could survive even longer.

I also made sure that the trigger actually works, and it does. Case closed! Thank you everyone for your help; now I can actually enjoy my map again. :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top