{"name":"expectedDestination","operator":null,"title":"expectedDestination","type":"command","url":"https://community.bistudio.com/wiki/expectedDestination","revid":377689,"updated":"2026-01-02T09:03:08Z","groups":["Unit Control","AI Behaviour"],"status":"ok","replaced_by":[],"games":[{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma1","name":"Armed Assault","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"local","effect":null,"server_exec":false},"exec":null,"description":"Return expected destination of unit as an array.","syntaxes":[{"syntax":"expectedDestination person","since":null,"effect":null,"exec":null,"params":[{"name":"person","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"person: Object"}],"returns":{"type":"Array with [destination, planningMode, forceReplan]","types":["Array"],"description":"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)","text":"Array with [destination, planningMode, forceReplan]\n- destination: PositionAGL\n- planningMode: String - can be one of:\n  - \"DoNotPlan\" - used when not moving\n  - \"DoNotPlanFormation\" - used in formation when simple path testing is used\n  - \"LEADER PLANNED\" - used for formation leader (full path finding used)\n  - \"LEADER DIRECT\" - used for DirectGo (like getin, supply)\n  - \"FORMATION PLANNED\" - used in formation when full path finding is used\n  - \"VEHICLE PLANNED\" - used for vehicle driver\n- forceReplan: Boolean -  specifies if path replanning was forced (through setDestination)"},"form":"unary","operator":null,"left":null,"right":{"text":"person","types":["Object"]}}],"examples":[{"text":"```sqf\n_data = expectedDestination player;\n```","code":["_data = expectedDestination player;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["setDestination","getUnitState"],"notes":[{"user":"Donnervogel","date":"2007-03-03T16:24:00Z","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."}],"categories":["ArmA: Armed Assault: New Scripting Commands","ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: AI Behaviour","Command Group: Unit Control","Introduced with Armed Assault version 1.00","Scripting Commands","Take On Helicopters: Scripting Commands"]}