- Joined
- Jan 25, 2011
- Messages
- 2,289
I am wondering which of these two versions of a trigger is the most efficient.
-
Unit Group - Pick every unit in Temp_Unit_Group_1 and do (Actions)
-
Loop - Actions
- Set Temp_Point_1 = (Position of (Picked unit))
- Set Temp_Point_2 = (Temp_Point_1 offset by 16.00 towards Temp_Real_1 degrees)
- Unit - Move (Picked unit) instantly to Temp_Point_2
- Custom script: call RemoveLocation (udg_Temp_Point_1)
- Custom script: call RemoveLocation (udg_Temp_Point_2)
-
Loop - Actions
-
Unit Group - Pick every unit in Temp_Unit_Group_1 and do (Actions)
-
Loop - Actions
- Set Temp_Integer_1 = (Temp_Integer_1 + 1)
- Set Temp_Point_1[Temp_Integer_1] = (Position of (Picked unit))
- Set Temp_Point_2[Temp_Integer_1] = (Temp_Point_1[Temp_Integer_1] offset by 16.00 towards Temp_Real_1 degrees)
- Unit - Move (Picked unit) instantly to Temp_Point_2[Temp_Integer_1]
-
Loop - Actions
-
For each (Integer INTEGER_001) from 1 to Temp_Integer_1, do (Actions)
-
Loop - Actions
- Custom script: call RemoveLocation (udg_Temp_Point_1[INTEGER_001])
- Custom script: call RemoveLocation (udg_Temp_Point_2[INTEGER_001])
-
Loop - Actions