Setup

AI units which can be set to automatically capture target zones, advance through captured zones and be reinforced when taking casualties.

Types

Type #Setup

Name

Description

addBaseZone

Adds a base zone to the task force, which will be used for reinforcing.

addControlZone

Adds a control zone task.
The task force units will move to and attack this zone as long as there are enemy units present.
If enemy units re-appear, the task force will retake it.
Task force units advancing through the task list will move through this task zone to get to the next one.

addIntermidiateZone

Adds an intermidiate zone task.
Task force units advancing through the task list will move through this task zone to get to the next one.

addRandomUnitAlternative

Adds a random unit alternative, given a maximum count, type and minimum count.
When the task force is reinforced, a random number (between minimum and maximum) of units will be spawned for the task force group.

addTaskGroup

Adds another group specification to the task force.
After a group is added, use @{#Setup.addUnits} to add units.
See "unit-types" for a complete list of available unit types.

addUnits

Adds unit specifications to the most recently added group (see @{#Setup.addTaskGroup}) of the task force.

linkBase

Links a base zone to a group. Linked bases will be disabled for this task force if the group is destroyed (see @{Setup.checkBaseLinks}.

new

Creates a new setup instance.

scanUnits

Invokes @{#Setup.copyGroupsLayout} and @{#Setup.useExistingGroups}.

setCountry

Sets the country ID of this task force.

setSkill

Sets the skill of the task force reinforcement units.
Skill alternatives are the same as in the mission editor: Any from "Average" to "Random".

setSpeed

Sets the desired speed of the task force units when advancing.

startUsingRoads

Specifies the task force to use roads when advancing through the next tasks that are added.

stopUsingRoads

Specifies the task force to stop using roads when advancing through the next tasks that are added.

useRandomUnits

Sets the task force to use a randomized unit spawner when reinforcing.
The random units must be specified with ${Setup.addRandomUnitAlternative}).

useStaging

Sets the task force to only use pre-existing units when reinforcing. Always invoke this before units are added (not after).

#Setup.addBaseZone

Adds a base zone to the task force, which will be used for reinforcing.

Parameters

  • #string zoneName - Name of base zone

Return

  • #Setup - This instance (self)

#Setup.addControlZone

Adds a control zone task.
The task force units will move to and attack this zone as long as there are enemy units present.
If enemy units re-appear, the task force will retake it.
Task force units advancing through the task list will move through this task zone to get to the next one.

Parameters

  • #string zoneName - Name of target zone

Return

  • #Setup - This instance (self)

#Setup.addIntermidiateZone

Adds an intermidiate zone task.
Task force units advancing through the task list will move through this task zone to get to the next one.

Parameters

  • #string zoneName

Return

  • #Setup

#Setup.addRandomUnitAlternative

Adds a random unit alternative, given a maximum count, type and minimum count.
When the task force is reinforced, a random number (between minimum and maximum) of units will be spawned for the task force group.

Parameters

  • #number max
  • #string type
  • #number minimum

Return

  • #Setup

#Setup.addTaskGroup

Adds another group specification to the task force.
After a group is added, use @{#Setup.addUnits} to add units.
See "unit-types" for a complete list of available unit types.

Return

  • #Setup - This instance (self)

#Setup.addUnits

Adds unit specifications to the most recently added group (see @{#Setup.addTaskGroup}) of the task force.

Parameters

  • #number count
  • #string type

Return

  • #Setup

#Setup.linkBase

Links a base zone to a group. Linked bases will be disabled for this task force if the group is destroyed (see @{Setup.checkBaseLinks}.

Parameters

  • #string zoneName
  • #string groupName

Return

  • #Setup

#Setup.new

Creates a new setup instance.

Return

  • #Setup - This instance (self)

#Setup.scanUnits

Invokes @{#Setup.copyGroupsLayout} and @{#Setup.useExistingGroups}.

Parameters

  • #string groupNamePrefix

Return

  • #Setup

#Setup.setCountry

Sets the country ID of this task force.

Parameters

  • #number country - Country ID

Return

  • #Setup - This instance (self)

#Setup.setSkill

Sets the skill of the task force reinforcement units.
Skill alternatives are the same as in the mission editor: Any from "Average" to "Random".

Parameters

  • #string skill - New skill

Return

  • #Setup - This instance (self)

#Setup.setSpeed

Sets the desired speed of the task force units when advancing.

Parameters

  • #boolean speed - New speed (in knots)

Return

  • #Setup - This instance (self)

#Setup.startUsingRoads

Specifies the task force to use roads when advancing through the next tasks that are added.

Return

  • #Setup

#Setup.stopUsingRoads

Specifies the task force to stop using roads when advancing through the next tasks that are added.

Return

  • #Setup

#Setup.useRandomUnits

Sets the task force to use a randomized unit spawner when reinforcing.
The random units must be specified with ${Setup.addRandomUnitAlternative}).

Return

  • #Setup

#Setup.useStaging

Sets the task force to only use pre-existing units when reinforcing. Always invoke this before units are added (not after).

Return

  • #Setup