Description
Sets a guided missile target. Does not work for all types of missiles. If the target is dead, it is ignored. The target has to be inside the missile's configured targeting cone for the command to work.
Syntax
Syntax 1
munition setMissileTarget target
Parameters:
Returns: Boolean - true if successful
Syntax 2
since arma3 2.18
munition setMissileTarget [target, force]
Parameters:
munition: Object - missiletarget: Object - valid missile target or objNull to cancel targetingforce: Boolean - true to force target (for example to target countermeasure flare object)
Returns: Boolean - true if successful
Examples
Example 1
missile1 setMissileTarget tank1;
Example 2
private _missile = createVehicle ["Missile_AGM_01_F", player modelToWorld [0,0,50], [], 0, "CAN_COLLIDE"];
_missile setDir getDir player;
private _target = createVehicle ["O_APC_Wheeled_02_rcws_v2_F", player modelToWorld [0,300,0], [], 0, "CAN_COLLIDE"];
_target setVehicleTiPars [1, 1, 1];
[_missile, _target] spawn {
params ["_missile", "_target"];
sleep 0.1;
_missile setMissileTarget _target;
};
Example 3
_missile setMissileTarget objNull; // cancels targeting
Example 4
_missile setMissileTarget [flare1, true];
See also
missileTargetPos · setMissileTargetPos · missileTarget · missileState