expectedDestination: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>")
No edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 19: Line 19:


|gr1= Unit Control
|gr1= Unit Control
|gr2= AI Behaviour


|descr= Return expected destination of unit as an array.
|descr= Return expected destination of unit as an array.
Line 26: Line 27:
|p1= person: [[Object]]
|p1= person: [[Object]]


|r1= [[Array]] in form:
|r1= [[Array]] in format [destination, planningMode, forceReplan] where:
*0: [[Position]]
* destination: [[Array]] format [[PositionAGL]]
*1: planningMode
* planningMode: [[String]] - can be one of:
*2: forceReplan
** "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]])


|x1= <code>_data = expectedDestination player;</code>
|x1= <sqf>_data = expectedDestination player;</sqf>


|seealso= [[setDestination]]
|seealso= [[setDestination]] [[getUnitState]]
}}
}}


<dl class="command_description">
{{Note
 
|user= Donnervogel
<dt><dt>
|timestamp= 20070303162400
<dd class="notedate">Posted on 16:24, 3 March 2007 (CET) </dd>
|text= 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.
<dt class="note">[[User:Donnervogel|Donnervogel]]</dt>
}}
<dd class="note">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.
 
</dl>

Latest revision as of 14:16, 22 October 2024

Hover & click on the images for description

Description

Description:
Return expected destination of unit as an array.
Groups:
Unit ControlAI Behaviour

Syntax

Syntax:
expectedDestination person
Parameters:
person: Object
Return Value:
Array in format [destination, planningMode, forceReplan] where:
  • destination: Array format 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;

Additional Information

See also:
setDestination getUnitState

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Donnervogel - c
Posted on Mar 03, 2007 - 16:24 (UTC)
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.