I was wanting to check if these triggers leaked at all, I'm not sure on how to check for leaks. And if it doesn't leak anyone is free to use this code for themselves.
-
Unit Respawn Init
-
Events
- Map initialization
- Conditions
-
Actions
- Set i = 0
- Set HostileUnitGroup = (Units owned by Player 11 (Dark Green))
-
Unit Group - Pick every unit in HostileUnitGroup and do (Actions)
-
Loop - Actions
- Set i = (i + 1)
- Set HostileUnit[i] = (Picked unit)
- Set HostileUnitType[i] = (Unit-type of (Picked unit))
- Set TempLoc1 = (Position of (Picked unit))
- Set HostileUnitXY[i] = TempLoc1
- Set HostileAngle[i] = (Facing of (Picked unit))
-
Loop - Actions
- Custom script: call RemoveLocation(udg_TempLoc1)
- Set UnitCount = i
-
Events
-
Unit Death
-
Events
- Unit - A unit owned by Player 11 (Dark Green) Dies
- Conditions
-
Actions
-
For each (Integer i) from 1 to UnitCount, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- HostileUnit[i] Equal to (Triggering unit)
-
Then - Actions
- Set j = i
- Set i = UnitCount
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Unit - Add a 10.00 second Generic expiration timer to (Triggering unit)
- Countdown Timer - Start HostileRezTimer[j] as a One-shot timer that will expire in 90.00 seconds
- Trigger - Add to Unit Respawn <gen> the event (Time - HostileRezTimer[j] expires)
-
For each (Integer i) from 1 to UnitCount, do (Actions)
-
Events
-
Unit Respawn
- Events
- Conditions
-
Actions
-
For each (Integer i) from 1 to UnitCount, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Remaining time for HostileRezTimer[i]) Equal to 0.00
-
Then - Actions
- Countdown Timer - Start HostileRezTimer[i] as a One-shot timer that will expire in 1.00 seconds
- Countdown Timer - Pause HostileRezTimer[i]
- Unit - Create 1 HostileUnitType[i] for Player 11 (Dark Green) at HostileUnitXY[i] facing HostileAngle[i] degrees
- Set HostileUnit[i] = (Last created unit)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer i) from 1 to UnitCount, do (Actions)
Last edited: