setMissileTarget: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<!-- Appropriate categories go here -->" to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma3 |Game=
| arma3


|1.92|Game Version =
|1.92


|arg=  |Multiplayer Arguments =
|arg=


|eff=  |Multiplayer Effects =
|eff=


|serverExec=  |Multiplayer Execution ("server" or empty)=
|serverExec=


|gr1= Object Manipulation |GROUP1=
|gr1= Object Manipulation


|gr2= Weapons |GROUP2=
|gr2= Weapons


| Sets a guided missile target. Doesn't work for all types of missiles. If target is dead, target is ignored. The target has to be inside configured missile targeting cone for command to work. |Description=
| Sets a guided missile target. Doesn't work for all types of missiles. If target is dead, target is ignored. The target has to be inside configured missile targeting cone for command to work.


| munition [[setMissileTarget]] target |Syntax=
| munition [[setMissileTarget]] target


|p1= munition: [[Object]]
|p1= munition: [[Object]]
Line 23: Line 23:
|p2= target: [[Object]]
|p2= target: [[Object]]


| [[Boolean]] - [[true]] if succeessful |Return Value=
| [[Boolean]] - [[true]] if succeessful


|x1= <code>missile1 [[setMissileTarget]] tank1;</code> |Example 1=
|x1= <code>missile1 [[setMissileTarget]] tank1;</code>


|x2= <code>_missile = [[createVehicle]] ["Missile_AGM_01_F",[[player]] [[modelToWorld]] [0,0,50],[],0,"CAN_COLLIDE"];
|x2= <code>_missile = [[createVehicle]] ["Missile_AGM_01_F",[[player]] [[modelToWorld]] [0,0,50],[],0,"CAN_COLLIDE"];
Line 34: Line 34:
[[sleep]] 0.1;
[[sleep]] 0.1;
_missile [[setMissileTarget]] _tgt;
_missile [[setMissileTarget]] _tgt;
};</code>|Example 2=
};</code>


| [[missileTargetPos]] [[setMissileTargetPos]] [[missileTarget]] |See Also=
| [[missileTargetPos]] [[setMissileTargetPos]] [[missileTarget]]
}}
}}



Revision as of 12:08, 18 January 2021

Hover & click on the images for description

Description

Description:
Sets a guided missile target. Doesn't work for all types of missiles. If target is dead, target is ignored. The target has to be inside configured missile targeting cone for command to work.
Groups:
Object ManipulationWeapons

Syntax

Syntax:
munition setMissileTarget target
Parameters:
munition: Object
target: Object
Return Value:
Boolean - true if succeessful

Examples

Example 1:
missile1 setMissileTarget tank1;
Example 2:
_missile = createVehicle ["Missile_AGM_01_F",player modelToWorld [0,0,50],[],0,"CAN_COLLIDE"]; _tgt = createVehicle ["O_APC_Wheeled_02_rcws_v2_F",player modelToWorld [0,300,0],[],0,"CAN_COLLIDE"]; _tgt setVehicleTiPars [1,1,1]; [_missile,_tgt] spawn { params ["_missile","_tgt"]; sleep 0.1; _missile setMissileTarget _tgt; };

Additional Information

See also:
missileTargetPos setMissileTargetPos missileTarget

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