| 08-29-2006, 09:21 AM | #1 |
Hmm I'll post this, see if anyone can see if theres anyway, I can remove a few position leak's Code:
Runite Copy
Events
Time - Every 0.12 seconds of game time
Conditions
Actions
For each (Integer A) from 2 to 12, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Terrain type at (Position of AAUnit[(Integer A)])) Equal to Icecrown Glacier - Rune Bricks
((AAUnit[(Integer A)] is Mechanical) Equal to True) or ((AAUnit[(Integer A)] is An Ancient) Equal to True)
Then - Actions
Unit - Kill AAUnit[(Integer A)]
Custom script: call RemoveLocation(udg_L_Copy_11)
Else - Actions
(ABOVE has the leak)
(I dont belive the bottom was does, but it works strangely)
For each (Integer A) from 2 to 12, do (Actions)
Loop - Actions
Set L_Copy_9 = (Position of AAUnit[(Integer A)])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((AAUnit[(Integer A)] is Mechanical) Equal to True) or ((AAUnit[(Integer A)] is An Ancient) Equal to True)
(Terrain type at L_Copy_9) Equal to Icecrown Glacier - Rough Dirt
Then - Actions
Unit - Kill AAUnit[(Integer A)]
Custom script: call RemoveLocation(udg_L_Copy_9)
Else - Actions
Do nothing
Do nothingIm making Escape Maker map btw... also I set all the escapers into AAUNIT (unit array of 12) |
| 08-29-2006, 09:36 AM | #2 |
Use the [ trigger ] tag next time, looks much neater :) I combined the two events and moved the RemoveLocation call outside the if statement (so the location is removed even if conditions aren't true) Trigger: |
| 08-29-2006, 02:10 PM | #3 |
There's a tut for memory leaks here on wc3campaigns... why don't you read it. |
