Siretu
Starcraft 2 Editor Moderator
- Reaction score
- 293
Code:
FormationMove
Events
Unit - A unit Is issued an order targeting a point
Conditions
(Triggering unit) Equal to Captain 0030 <gen>
Actions
Set temp_integer = 0
Set SquadInteger = 0
Set Temp_Point2 = (Target point of issued order)
Set Temp_Point = (Temp_Point2 offset by 400.00 towards 140.00 degrees)
Unit - Order testdummy2 to Move To Temp_Point
For each (Integer A) from 1 to 3, do (Actions)
Loop - Actions
Unit Group - Pick every unit in SquadGroup[(Custom value of Captain 0030 <gen>)] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
temp_integer Less than or equal to 250
SquadInteger Equal to 0
Then - Actions
Unit - Order (Picked unit) to Attack-Move To (Temp_Point offset by (Real(temp_integer)) towards 0.00 degrees)
Unit Group - Add (Picked unit) to SquadGroup2
Unit Group - Remove (Picked unit) from SquadGroup[(Custom value of (Triggering unit))]
Set temp_integer = (temp_integer + 50)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SquadInteger Equal to 1
Then - Actions
Unit - Order (Picked unit) to Attack-Move To ((Position of testdummy) offset by 50.00 towards 270.00 degrees)
Set testdummy = (Picked unit)
Set Temp_Point = (Position of testdummy)
Unit - Order (Picked unit) to Move To (Temp_Point offset by (Real(temp_integer)) towards 0.00 degrees)
Unit Group - Add (Picked unit) to SquadGroup2
Unit Group - Remove (Picked unit) from SquadGroup[(Custom value of (Triggering unit))]
Set temp_integer = (temp_integer + 50)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SquadInteger Equal to 2
Then - Actions
Unit - Order (Picked unit) to Attack-Move To ((Position of testdummy) offset by 50.00 towards 270.00 degrees)
Set Temp_Point = ((Position of testdummy) offset by 50.00 towards 270.00 degrees)
Set testdummy = (Picked unit)
Unit - Order (Picked unit) to Move To (Temp_Point offset by (Real(temp_integer)) towards 0.00 degrees)
Unit Group - Add (Picked unit) to SquadGroup2
Unit Group - Remove (Picked unit) from SquadGroup[(Custom value of (Triggering unit))]
Set temp_integer = (temp_integer + 50)
Else - Actions
Set SquadInteger = (SquadInteger + 1)
Set temp_integer = 0
Unit Group - Add (Picked unit) to SquadGroup2
Unit Group - Add all units of SquadGroup2 to SquadGroup[(Custom value of (Triggering unit))]
Yes it's probably really unneccesary. It's supposed to move units in a group and make them stand in 3 rows with units with 6 units in each.
Code:
------------------
------------------
------------------
Code:
------------------
------------------
-----------------