CaptureNearestNext

From Ashes of the Singularity - Official Wiki
Revision as of 21:01, 18 January 2017 by Patiobattle04 (talk | contribs) (Created page with "Category:Commands The CaptureNearestNext command order an army to capture the nearest neutral or enemy-controlled region after executing whatever order...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The CaptureNearestNext command order an army to capture the nearest neutral or enemy-controlled region after executing whatever orders it already has. See also: CaptureNearest

Arguments

  • Name - The name of the unit to do the capturing
  • Repeat - Whether to repeat the order (indefinitely)

Limitations

  • Can only order script-spawned units, not units built 'organically' during gameplay
  • Will send the army at the nearest unowned Relay or Generator to their current position. If you want to send them somewhere specific, use AttackAttackMove or MoveUnit instead.

Example

 <Trigger Name="EnemyWave02" Type="Timer" Timer="10" Inactive="1" NotOtherTrigger="FactorySwitch">
   <SpawnUnit Name="Enemy02_Leader" Template="PHC_T1_Light" Player="1" Position="-500,300" />
   <SpawnUnit Name="Enemy02_Minion01" Parent="Enemy02_Leader" Template="PHC_T1_Light" Player="1" Position="-510,300" />
   <SpawnUnit Name="Enemy02_Minion01" Parent="Enemy02_Leader" Template="PHC_T1_Light" Player="1" Position="-530,300" />
   <SpawnUnit Name="Enemy02_Minion01" Parent="Enemy02_Leader" Template="PHC_T1_Light" Player="1" Position="-540,300" />
   <SpawnUnit Name="Enemy02_Minion02" Parent="Enemy02_Leader" Template="PHC_T1_MRM" Player="1" Position="-520,300" />
   <SpawnUnit Name="Enemy02_Minion02" Parent="Enemy02_Leader" Template="PHC_T1_MRM" Player="1" Position="-520,310" />
   <SpawnUnit Name="Enemy02_Minion03" Parent="Enemy02_Leader" Template="PHC_T1_MRM" Player="1" Position="-500,310" />
   <SpawnUnit Name="Enemy02_Minion04" Parent="Enemy02_Leader" Template="PHC_T1_MRM" Player="1" Position="-500,320" />
   <AttackAttackMove Name="Enemy02_Leader" Position="-4850,350" />
   <CaptureNearestNext Name="Enemy02_Leader" Repeat="true"/>
   <AttackAttackMove Name="Enemy02_Leader" Position="-9100,-8500" />
   <ActivateTrigger Target="EnemyWave01" />
 </Trigger>

This spawns an army and moves it to one side of a central plateau before telling it to CaptureNearestNext. This (almost 100%, it can get weird in certain unusual gamestates) ensures that it attacks one side of the map while the units created by similar but mirrored EnemyWave01 trigger attack the other side.