NOTE: Custom values of casting units predetermined
The text displays at the end display 0 and 14 respectively. Why does TempArmyGroup[(Custom value of (Triggering unit))] refuse to be set?
Trigger:
- Pincer Movement
- Events
- Unit - A unit Begins casting an ability
- Conditions
- (Ability being cast) Equal to Pincer Movement
- Actions
- Set TempPoint = (Target point of ability being cast)
- Set TempXValue = 0.00
- Set TempYValue = 0.00
- Unit Group - Pick every unit in ArmyGroups[(Custom value of (Triggering unit))] and do (Actions)
- Loop - Actions
- Set TempXValue = (TempXValue + (X of (Position of (Picked unit))))
- Set TempYValue = (TempYValue + (Y of (Position of (Picked unit))))
- Unit - Make (Picked unit) face TempPoint over 0.00 seconds
- Set TempReal = (Angle from (Position of (Picked unit)) to TempPoint)
- Loop - Actions
- Set TempXValue = (TempXValue / (Real((Number of units in ArmyGroups[(Custom value of (Triggering unit))]))))
- Set TempYValue = (TempYValue / (Real((Number of units in ArmyGroups[(Custom value of (Triggering unit))]))))
- Wait 2.00 seconds
- Set TempNumber = (((Number of units in ArmyGroups[(Custom value of (Triggering unit))]) / 2) + 0)
- Unit Group - Pick every unit in (Random TempNumber units from ArmyGroups[(Custom value of (Triggering unit))]) and do (Actions)
- Loop - Actions
- Unit Group - Add (Picked unit) to TempArmyGroup[(Custom value of (Triggering unit))]
- Loop - Actions
- Set TempDistance = (Distance between (Point(TempXValue, TempYValue)) and TempPoint)
- Unit Group - Pick every unit in TempArmyGroup[(Custom value of (Triggering unit))] and do (Actions)
- Loop - Actions
- Unit - Order (Picked unit) to Attack-Move To ((Point(TempXValue, TempYValue)) offset by TempDistance towards (TempReal + 45.00) degrees)
- Loop - Actions
- Wait 0.50 seconds
- Unit Group - Pick every unit in ArmyGroups[(Custom value of (Triggering unit))] and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Picked unit) is in TempArmyGroup[(Custom value of (Triggering unit))]) Equal to False
- Then - Actions
- Unit - Order (Picked unit) to Attack-Move To ((Point(TempXValue, TempYValue)) offset by TempDistance towards (TempReal - 45.00) degrees)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Game - Display to (All players) the text: (String((Number of units in TempArmyGroup[(Custom value of (Triggering unit))])))
- Game - Display to (All players) the text: (String((Number of units in ArmyGroups[(Custom value of (Triggering unit))])))
- Events
The text displays at the end display 0 and 14 respectively. Why does TempArmyGroup[(Custom value of (Triggering unit))] refuse to be set?