find the leak

LightChaosma

New Member
Reaction score
60
hi guys,

i've started making maps agian and i noticed my skills aren't as good as they were, and i've come across a problem...

in the following trigger i a aleak. with these redicoulsy high values it executes somthing very much. the first time it works good, but after 3-4 times, the game freezes...
i suspect the leak is somewhere in the red area.


Trigger:
  • blast skill
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 8, 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 FireTower[(Integer A)]) Equal to Fire Tower 1
            • Then - Actions
              • Set firecounter1[(Integer A)] = (firecounter1[(Integer A)] + 1)
              • Set tempint[1] = 100
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • firecounter1[(Integer A)] Equal to (tempint[1] + 1)
                • Then - Actions
                  • Set firecounter1[(Integer A)] = tempint[1]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • firecounter1[(Integer A)] Equal to tempint[1]
                • Then - Actions
                  • Set firecounter2[(Integer A)] = (firecounter2[(Integer A)] + 1)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • firecounter1[(Integer A)] Equal to tempint[1]
                      • firecounter2[(Integer A)] Equal to (200 + 1)
                • Then - Actions
                  • Set firecounter1[(Integer A)] = 0
                  • Set firecounter2[(Integer A)] = 0
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • firecounter2[(Integer A)] Greater than 0
                • Then - Actions
                  • Set temppoint[1] = (Position of FireTower[(Integer A)])
                  • For each (Integer B) from 1 to 15, do (Actions)
                    • Loop - Actions
                      • Unit - Create 1 dummy for (Owner of FireTower[(Integer A)]) at temppoint[1] facing Default building facing degrees
                      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                      • Unit - Add FireBall to (Last created unit)
                      • Set temppoint[2] = (temppoint[1] offset by (Random real number between 200.00 and 1750.00) towards (Random angle) degrees)
                      • For each (Integer C) from 1 to 3, do (Actions)
                        • Loop - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • And - All (Conditions) are true
                                • Conditions
                                  • (Terrain type at temppoint[2]) Not equal to Dalaran - White Marble
                                  • (Terrain type at temppoint[2]) Not equal to Dalaran - Black Marble
                            • Then - Actions
                              • Set C = 1
                              • Custom script: call RemoveLocation (udg_temppoint[2])
                              • Set temppoint[2] = (temppoint[1] offset by (Random real number between 200.00 and 1750.00) towards (Random angle) degrees)
                            • Else - Actions
                              • Set C = 3
                      • Unit - Order (Last created unit) to Neutral Tinker - Cluster Rockets temppoint[2]
                      • Custom script: call RemoveLocation (udg_temppoint[2])
                  • Custom script: call RemoveLocation (udg_temppoint[1])
                • Else - Actions
            • Else - Actions
              • Do nothing
 

jomik

New Member
Reaction score
17
Are you sure it's not because this is too heavy? :p

EDIT: Try to move the call RemoveLocations behind the IF-THEN-ELSE, so that they'll get looped through no matter what.
 

LightChaosma

New Member
Reaction score
60
could be... but would be wierd... why would the first time work perfectly, and the game gets progressivky slowwer... i can only think of 2 explenations.. a point leak, or too many dummies...
 

LightChaosma

New Member
Reaction score
60
i got it, my dummies leave corpses... when i made them explode on death the problem was solved... but isnt there another way to prevent a corpse from orming?

nvm, got it :)
 

Summoned

New Member
Reaction score
51
What's the decay property of the dummy? From the trigger, that's the only thing that looks like it might be a problem. Since it creates so many units at a time, if the dummy's corpses stay on the map, it could potentially lag.

EDIT: Welp, guess that's it. :p Anyway, just set their decay option in the unit editor to can't raise, does not decay.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top