Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:1.00

Description

Description:Set the destination for path-planning for an AI unit.

This is a low-level command, which is overridden by group radio, as well as the unit FSM. It directly defines a wanted destination for an AI unit.

In case of discrepancies between the destination defined in doMove and setDestination, the doMove location is used (the doMove destination overwrites the setDestination destination).

Syntax

Syntax:unit setDestination [position, planningMode, forceReplan]
Parameters:
  • unit: Object - Affected unit.
  • position: Array - Format Position-2.
  • planningMode: String - Can be:
    • "DoNotPlan" - Used when not moving.
    • "DoNotPlanFormation" - Used in formation, when simple path testing is used.
    • "Leader Planned" - Used for formation leader (full path-finding used).
    • "Leader Direct" - Used for DirectGo (such as getin, supply)
    • "Formation Planned" - Used for formation subordinates.
    • "Vehicle Planned" - Used for the vehicle driver.
  • forceReplan: Boolean - Specifies, if re-planning of the path should be forced.
Return Value:Nothing

Examples

Examples:

Additional Information

See also: expectedDestination, doMove
Multiplayer:
Problems:

Notes




Notes

Bottom Section