{"name":"setMissileTargetPos","operator":null,"title":"setMissileTargetPos","type":"command","url":"https://community.bistudio.com/wiki/setMissileTargetPos","revid":377534,"updated":"2026-01-02T06:53:19Z","groups":["Object Manipulation","Weapons"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.92"}],"since":{"game":"arma3","name":"Arma 3","version":"1.92"},"arma3_since":"1.92","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Sets a guided munition target position.\nThe munition must have `manualControl` config entry to use this command.\nThe target position has to be inside the missile's configured targeting cone for the command to work.","syntaxes":[{"syntax":"munition setMissileTargetPos position","since":null,"effect":null,"exec":null,"params":[{"name":"munition","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"munition: Object"},{"name":"position","type":"PositionATL","optional":false,"default":null,"description":null,"types":["PositionATL"],"since":null,"text":"position: PositionATL"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"munition","types":["Object"]},"right":{"text":"position","types":["PositionATL"]}}],"examples":[{"text":"```sqf\nmissile1 setMissileTargetPos unitAimPosition tank1;\n```","code":["missile1 setMissileTargetPos unitAimPosition tank1;"]},{"text":"```sqf\nprivate _missile = createVehicle [\"M_Scalpel_AT\", player modelToWorld [0,0,100], [], 0, \"CAN_COLLIDE\"];\n_missile setMissileTargetPos (player modelToWorld [0,100,0]);\n```","code":["private _missile = createVehicle [\"M_Scalpel_AT\", player modelToWorld [0,0,100], [], 0, \"CAN_COLLIDE\"];\n_missile setMissileTargetPos (player modelToWorld [0,100,0]);"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["missileTargetPos","setMissileTarget","missileTarget","missileState"],"notes":[{"user":"Benargee","date":"2020-04-13T06:04:00Z","text":"To get list of compatible missiles with `manualControl = 1`, use the below script and paste the clipboard results to a text editor.\n\n```sqf\nprivate _cfgCount = count (configfile >> \"CfgAmmo\");\nprivate _pasteStr = \"\";\n\nfor \"_x\" from 0 to (_cfgCount - 1) do {\n    _cfg = (configFile >> \"CfgAmmo\") select _x;\n    _ammoClassName = configName _cfg;\n    private _manCtrl = getNumber (configFile >> \"CfgAmmo\" >> _ammoClassName >> \"manualControl\");\n    if (_manCtrl > 0) then {\n            _pasteStr = _pasteStr + _ammoClassName + endl;\n    };\n};\n\ncopyToClipboard _pasteStr;\n```"},{"user":"Lou Montana","date":"2022-08-12T22:06:00Z","text":"Tested with a player-controlled AH-99 firing DAGR, a civilian helicopter named `heli` above water/land, and the following code:\n\n```sqf\nif (!isNil \"EH\") then\n{\n    vehicle player removeEventHandler [\"Fired\", EH];\n};\nEH = vehicle player addEventHandler [\"Fired\", {\nparams [\"_unit\", \"_weapon\", \"_muzzle\", \"_mode\", \"_ammo\", \"_magazine\", \"_missile\", \"_gunner\"];\n    _missile setMissileTargetPos getPosATL heli; // changing here getPosATL / getPosASL / getPos\n    systemChat str [_missile, missileTarget _missile, missileTargetPos _missile];\n}];\n```"}],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Manipulation","Command Group: Weapons","Introduced with Arma 3 version 1.92","Scripting Commands"]}