Man-o-Bomb
New Member
- Reaction score
- 30
Im new using custom scripts to destroy memory leaks.
But my map starts lagging like crazy, so if anyone could look this trigger through, it would help alot.
But my map starts lagging like crazy, so if anyone could look this trigger through, it would help alot.
Code:
Move Waves
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
Set Temp_Group = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Tidal Wave) and ((Owner of (Matching unit)) Equal to Neutral Hostile)))
Unit Group - Pick every unit in Temp_Group and do (Actions)
Loop - Actions
Set Temp_Point = ((Position of (Picked unit)) offset by 3.00 towards 0.00 degrees)
Unit - Move (Picked unit) instantly to Temp_Point, facing 0.00 degrees
Custom script: call RemoveLocation (udg_Temp_Point)
Custom script: call DestroyGroup (udg_Temp_Group)
Set Temp_Group = (Units within 100.00 of (Position of (Picked unit)))
Unit Group - Pick every unit in Temp_Group and do (Actions)
Loop - Actions
Set Temp_Point = ((Position of (Picked unit)) offset by 3.00 towards 0.00 degrees)
Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 3.00 towards 0.00 degrees), facing Default building facing degrees
Custom script: call RemoveLocation (udg_Temp_Point)
Custom script: call DestroyGroup (udg_Temp_Group)