{"name":"setDestination","title":"setDestination","type":"command","url":"https://community.bistudio.com/wiki/setDestination","revid":377507,"updated":"2026-01-02T06:50:09Z","groups":["Unit Control"],"status":"ok","games":{"ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofpe 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"description":"Set the destination for path planning of the pilot.\n\nPossible values for planningMode are:\n\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\nWorks best when used on agents. Using \"LEADER PLANNED\" will trigger `\"PathCalculated\"` Event Handler","syntaxes":[{"syntax":"object setDestination [position, planningMode, forceReplan]","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"position","type":"Position","type_expr":"Position"},{"name":"planningMode","type":"String","type_expr":"String"},{"name":"forceReplan","type":"Boolean","description":"specifies if replanning of the path should be forced.","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[position, planningMode, forceReplan]"}}],"examples":[{"code":["bob setDestination [screenToWorld [0.5,0.5], \"LEADER PLANNED\", true];"]}],"see_also":["expectedDestination","doMove","calculatePath"]}