| 02-04-2006, 05:28 PM | #1 |
Hello everyone, I'm making a map that uses alot of repeating timers. Right now, I'm trying to get rid of all the leaks, but I don't know a way to get past this one. The leak is in the UnitGroup where all units are picked. I cannot set the picked units to a Unitgroup variable and then destroy the group later because the units which are suppose to be picked have the locust ability and they will cannot be picked if they have that ability. Instead, the units are added to the group after they are created so destroying the group after the timer expires does not seem like an option. Is there any way to nullify this leak? -------------------------------------------------------------------------- Events Time - TimerGeneric expires Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Number of units in UGroupGeneric) Not equal to 0 Then - Actions Unit Group - Pick every unit in UGroupGeneric and do (Actions) //Source of leak Loop - Actions Set PointAMove = ((Position of (Picked unit)) offset by 6.00 towards (Facing of (Picked unit)) degrees) Unit - Move (Picked unit) instantly to PointAMove Custom script: call RemoveLocation (udg_PointAMove) Else - Actions Countdown Timer - Pause (Expiring timer) |
| 02-04-2006, 07:26 PM | #2 |
I'm pretty sure that locust wont effect you being able to choose units for a unit group at all, so just do what you were talking about earlier. Also, be sure to put triggers inside [ trigger] [/ trigger] tags. (No spaces) |
| 02-04-2006, 07:47 PM | #3 |
Actually, "units in region/range" does ignore locust units. "units owned by player" doesn't, though. In any event, your trigger doesn't leak at all, so no worries. The "pick every unit in group" isn't the source of leak, the group itself is. Of course, that only leaks if you create the group in your trigger (with a function like "units in region") and don't destroy it; in your case, you keep reusing the same group, you're not creating any new groups that you would fail to destroy. |
| 02-05-2006, 05:04 AM | #4 |
Hmm, I see. Thanks for your help. |
