For AI units I have found the following values: planningMode is "LEADER PLANNED" when the unit is ordered by the group leader to go somewhere or if the unit is the group leader and it follows a waypoint. Otherwise planningMode it is "DoNotPlan". Units moving in formation have "DoNotPlan" as long as they don't receive orders by the group leader. Units also have "DoNotPlan" when they don't move. Units executing special formation tasks like engaging or return to formation have "FORMATION PLANNED" as long they have not fulfilled the task.
Description
Return expected destination of unit as an array.
Syntax
expectedDestination person
Parameters:
person: Object
Returns: Array with [destination, planningMode, forceReplan]
- destination: PositionAGL
- planningMode: String - can be one of:
- "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 (like getin, supply)
- "FORMATION PLANNED" - used in formation when full path finding is used
- "VEHICLE PLANNED" - used for vehicle driver
- forceReplan: Boolean - specifies if path replanning was forced (through setDestination)
Examples
Example 1
_data = expectedDestination player;