AttackAttackMove

From Ashes of the Singularity
Jump to: navigation, search

The AttackAttackMove command orders an army to move to a specific area, engaging enemies along the way.

Arguments

  • Name - The name of the army that will be given the order.
  • Repeat - Whether to repeat the order. Use with multiple AttackAttackMove commands to create a patrol path.
  • Position - Where the army is ordered to move to.

Common Usage

  • Ordering script-spawned attack waves to assault a position

Limitations

  • Cannot command units built "organically" during the scenario, only units spawned via script
  • Will only order the last unit spawned with the given name (relevant when using repeating triggers)

Example

 <Trigger Name="tNorthIncoming_TeleComplete" Type="Timer" Timer="30" Inactive="1" >
   <Objective Name="oIncoming"     String="Europa_oIncoming_TeleComplete"  SetCheck="true" />
   <SpawnUnit Name="uNorthReinforcement_Leader" Player="2" Template="PHC_2_Athena" Position="200,-5900" />
   <SpawnUnit Name="uNorthReinforcement_01" Player="2" Template="PHC_2_Athena" Parent="uNorthReinforcement_Leader" Position="240,-5900" />
   <SpawnUnit Name="uNorthReinforcement_02" Player="2" Template="PHC_2_Zeus" Parent="uNorthReinforcement_Leader" Position="200,-5940" />
   [...]
   <MoveUnit Name="uNorthReinforcement_Leader" Position="800,-6100" />
   <CaptureNearestNext Name="uNorthReinforcement_Leader" />
   <MoveUnit Name="uNorthReinforcement_Leader" Position="2600,-6300" />
   <CaptureNearestNext Name="uNorthReinforcement_Leader" />
   <MoveUnit Name="uNorthReinforcement_Leader" Position="4300,-6200" />
   <CaptureNearestNext Name="uNorthReinforcement_Leader" />
   <CaptureNearestNext Name="uNorthReinforcement_Leader" />
   <CaptureNearestNext Name="uNorthReinforcement_Leader" />
   <AttackAttackMove Name="uNorthReinforcement_Leader" Position="6700,0" />
   <ActivateTrigger Target="tNorthIncoming_Dialog" />
 </Trigger>

This trigger spawns an army and gives it a sequence of commands, ending with an AttackAttackMove that throws it at the player's Nexus once its other orders are complete.

Simply using an AttackAttackMove command would likely leave regions un-captured, since the army would not wait to complete the capture.