laserTarget: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Take[ _]On[ _]Helicopters(\|.*)?\]\]" to "{{GameCategory|tkoh|Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Command|Comments=
{{Command|Comments=
____________________________________________________________________________________________


| arma2oa |Game name=
| arma2oa |Game name=
Line 9: Line 8:


|gr1= Weapons |GROUP1=
|gr1= Weapons |GROUP1=
____________________________________________________________________________________________


| Returns laser target object created by given unit (vehicle or soldier) when using a laser targeting device. |DESCRIPTION=
| Returns laser target object created by given unit (vehicle or soldier) when using a laser targeting device. |DESCRIPTION=
____________________________________________________________________________________________


| [[laserTarget]] unitName |SYNTAX=
| [[laserTarget]] unitName |SYNTAX=
Line 19: Line 16:


| [[Object]] - laser target or [[objNull]] if no laser target exists |RETURNVALUE=
| [[Object]] - laser target or [[objNull]] if no laser target exists |RETURNVALUE=
____________________________________________________________________________________________


|x1= <code>[[private]] _target = [[laserTarget]] [[gunner]] heli;</code> |EXAMPLE1=
|x1= <code>[[private]] _target = [[laserTarget]] [[gunner]] heli;</code> |EXAMPLE1=


|x2= <code>[[private]] _designatedPos = [[getPosATL]] [[laserTarget]] [[player]]; </code> |EXAMPLE2=
|x2= <code>[[private]] _designatedPos = [[getPosATL]] [[laserTarget]] [[player]]; </code> |EXAMPLE2=
____________________________________________________________________________________________


| [[cursorTarget]], [[setMissileTarget]] |SEEALSO=
| [[cursorTarget]], [[setMissileTarget]] |SEEALSO=

Revision as of 01:39, 17 January 2021

Hover & click on the images for description

Description

Description:
Returns laser target object created by given unit (vehicle or soldier) when using a laser targeting device.
Groups:
Weapons

Syntax

Syntax:
laserTarget unitName
Parameters:
unitName: Object
Return Value:
Object - laser target or objNull if no laser target exists

Examples

Example 1:
private _target = laserTarget gunner heli;
Example 2:
private _designatedPos = getPosATL laserTarget player;

Additional Information

See also:
cursorTargetsetMissileTarget

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

Bottom Section