LightChaosma
New Member
- Reaction score
- 60
can someone do a leak inspection on this trigger?
i'm pretty sure i got it leakfree, but once i build like 100 of these towers, and a unit of P12 paasses by, my game lags like no other, also afterwards, when the unit has been gone for like a minute....
Trigger:
- lightning tower
- Events
- Time - Every 0.15 seconds of game time
- Conditions
- Actions
- Set tempunitgroup[1] = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Lightning tower 1))
- Unit Group - Pick every unit in tempunitgroup[1] and do (Actions)
- Loop - Actions
- Set temppoint[1] = (Position of (Picked unit))
- Set tempunitgroup[2] = (Units within 900.00 of temppoint[1] matching ((Owner of (Matching unit)) Equal to Player 12 (Brown)))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Random integer number between 1 and 4) Equal to 2
- Then - Actions
- Set tempunitgroup[3] = (Units within 1200.00 of temppoint[1] matching ((Owner of (Matching unit)) Equal to (Owner of (Picked unit))))
- Set tempunitgroup[4] = (Units of type Aura Tower)
- Unit Group - Remove all units of tempunitgroup[4] from tempunitgroup[3]
- Unit Group - Remove (Picked unit) from tempunitgroup[3]
- Unit - Order (Picked unit) to Orc Shaman - Bloodlust (Random unit from tempunitgroup[3])
- Custom script: call DestroyGroup (udg_tempunitgroup[3])
- Custom script: call DestroyGroup (udg_tempunitgroup[4])
- Else - Actions
- If - Conditions
- Unit - Order (Picked unit) to Attack (Random unit from tempunitgroup[2])
- Custom script: call DestroyGroup (udg_tempunitgroup[2])
- Custom script: call RemoveLocation (udg_temppoint[1])
- Loop - Actions
- Custom script: call DestroyGroup (udg_tempunitgroup[1])
- Events
i'm pretty sure i got it leakfree, but once i build like 100 of these towers, and a unit of P12 paasses by, my game lags like no other, also afterwards, when the unit has been gone for like a minute....