SetupBase

Types

Type #SetupBase

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.

addTask

Adds a task to the task force

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.

assertCanChangeReinforcer

Performs checks to determine if the task force can change reinforcer.

autoAddUnitLayout

Automatically adds groups and units.
Determines which groups and units that should be added to the task force by looking at a list of units and copying the layout.

autoAddUnitLayoutFromBases

Looks through base zones for units and attempts to add the same layout to the task force (by invoking ${Setup.autoAddUnitLayout})

autoInitialize

Automatically initializes the task force by starting timers (if not started) and adding groups and units (if not added).
Default reinforcement timer intervals is 600 seconds. Default advancement timer intervals is 300 seconds.

checkBaseLinks

Checks all base zones with links to see if the specified unit still exists in the mission.
If the group linked with the base zone does not exist (is destroyed), the base zone is disabled for this task force.

containsUnit

Checks if a particular unit is present in this task force.

copyGroupsLayout

Scans the mission once for any group(s) with a name prefix. The task force will then use the same layout as the group(s) when reinforcing.

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}.

setAdvancementTimer

Starts a timer which updates the current target zone, and issues the task force units to engage it on given time intervals.
Invokes @{#Setup.moveToTarget}.

setCountry

Sets the country ID of this task force.

setMaxRouteDistance

Sets the maximum distance of unit routes.
If set, this number constrains how far groups of the task force will move between each move command (advancement).
When units are moving towards a target, units will stop at this distance and wait for the next movement command.
This prevents lag when computing routes over long distances.

setReinforcer

Sets the reinforcer of the task force.

setReinforceTimer

Starts a timer which reinforces the task force on time intervals.
Every time interval, linked base zones are checked (see @{Setup.checkBaseLinks}).
If all base zones are disabled (due to linked groups being destroyed), the task force is not reinforced.

setReinforceTimerMax

Sets the maximum time reinforcements will keep coming.

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.

stopAdvancementTimer

Stops the advancement timer

stopReinforcing

Stops the reinforcing/respawning timers (see @{#Setup.setReinforceTimer}).

stopUsingRoads

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

useExistingGroups

Scans the mission once for any group(s) with a name prefix. The task force will immidiately assume control of the units in the group(s)

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).

#SetupBase.addBaseZone

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

Parameters

  • #string zoneName - Name of base zone

Return

  • #SetupBase - This instance (self)

#SetupBase.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

  • #SetupBase - This instance (self)

#SetupBase.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

  • #SetupBase

#SetupBase.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

  • #SetupBase

#SetupBase.addTask

Adds a task to the task force

Parameters

  • task#Task task

Return

  • #SetupBase

#SetupBase.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

  • #SetupBase - This instance (self)

#SetupBase.addUnits

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

Return

  • #SetupBase

#SetupBase.assertCanChangeReinforcer

Performs checks to determine if the task force can change reinforcer.


#SetupBase.autoAddUnitLayout

Automatically adds groups and units.
Determines which groups and units that should be added to the task force by looking at a list of units and copying the layout.

Parameters

  • #list<DCSUnit#Unit> units

Return

  • #SetupBase

#SetupBase.autoAddUnitLayoutFromBases

Looks through base zones for units and attempts to add the same layout to the task force (by invoking ${Setup.autoAddUnitLayout})

Return

  • #SetupBase

#SetupBase.autoInitialize

Automatically initializes the task force by starting timers (if not started) and adding groups and units (if not added).
Default reinforcement timer intervals is 600 seconds. Default advancement timer intervals is 300 seconds.

Return

  • #SetupBase

#SetupBase.containsUnit

Checks if a particular unit is present in this task force.

Parameters

  • DCSUnit#Unit unit - Unit in question

Return

  • #boolean - True if this task force contains the unit, false otherwise.

#SetupBase.copyGroupsLayout

Scans the mission once for any group(s) with a name prefix. The task force will then use the same layout as the group(s) when reinforcing.

Return

  • #SetupBase

#SetupBase.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

  • #SetupBase

#SetupBase.new

Creates a new setup instance.

Return

  • #SetupBase - This instance (self)

#SetupBase.scanUnits

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

Parameters

  • #string groupNamePrefix

Return

  • #SetupBase

#SetupBase.setAdvancementTimer

Starts a timer which updates the current target zone, and issues the task force units to engage it on given time intervals.
Invokes @{#Setup.moveToTarget}.

Parameters

  • #number timeInterval - Seconds between each target update

Return

  • #SetupBase - This instance (self)

#SetupBase.setCountry

Sets the country ID of this task force.

Parameters

  • #number country - Country ID

Return

  • #SetupBase - This instance (self)

#SetupBase.setMaxRouteDistance

Sets the maximum distance of unit routes.
If set, this number constrains how far groups of the task force will move between each move command (advancement).
When units are moving towards a target, units will stop at this distance and wait for the next movement command.
This prevents lag when computing routes over long distances.

Parameters

  • #number maxDistanceKM - Maximum distance (kilometres)

Return

  • #SetupBase - This instance (self)

#SetupBase.setReinforcer

Sets the reinforcer of the task force.

Parameters

  • reinforcer#Reinforcer reinforcer

#SetupBase.setReinforceTimer

Starts a timer which reinforces the task force on time intervals.
Every time interval, linked base zones are checked (see @{Setup.checkBaseLinks}).
If all base zones are disabled (due to linked groups being destroyed), the task force is not reinforced.

Parameters

  • #number timeInterval - Time [seconds] between each reinforcement

Return

  • #SetupBase - This instance (self)

#SetupBase.setReinforceTimerMax

Sets the maximum time reinforcements will keep coming.

Parameters

  • #number time - Time [seconds] until reinforcements will stop coming

Return

  • #SetupBase

#SetupBase.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

  • #SetupBase - This instance (self)

#SetupBase.setSpeed

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

Parameters

  • #boolean speed - New speed (in knots)

Return

  • #SetupBase - This instance (self)

#SetupBase.startUsingRoads

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

Return

  • #SetupBase

#SetupBase.stopAdvancementTimer

Stops the advancement timer

Return

  • #SetupBase

#SetupBase.stopReinforcing

Stops the reinforcing/respawning timers (see @{#Setup.setReinforceTimer}).

Return

  • #SetupBase

#SetupBase.stopUsingRoads

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

Return

  • #SetupBase

#SetupBase.useExistingGroups

Scans the mission once for any group(s) with a name prefix. The task force will immidiately assume control of the units in the group(s)

Return

  • #SetupBase

#SetupBase.useRandomUnits

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

Return

  • #SetupBase

#SetupBase.useStaging

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

Return

  • #SetupBase