laserTarget: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Arma[ _]3(\|.*)\]\]" to "{{GameCategory|arma3|Scripting Commands}}")
m (Some wiki formatting)
 
(27 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma2oa |Game name=
|game1= arma2oa
|version1= 1.50


|1.51|Game version=
|game2= tkoh
|version2= 1.00


|arg= global|Multiplayer Arguments=
|game3= arma3
|version3= 0.50


|gr1= Weapons |GROUP1=
|arg= global
____________________________________________________________________________________________


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


| [[laserTarget]] unitName |SYNTAX=
|descr= Returns the laser target object created by given unit (vehicle or soldier) when using a laser targeting device. The main syntax targets the primary gunner turret.


|p1= unitName: [[Object]] |PARAMETER1=
|s1= [[laserTarget]] entity


| [[Object]] - laser target or [[objNull]] if no laser target exists |RETURNVALUE=
|p1= entity: [[Object]] - unit or vehicle
____________________________________________________________________________________________


|x1= <code>[[private]] _target = [[laserTarget]] [[gunner]] heli;</code> |EXAMPLE1=
|r1= [[Object]] - laser target or [[objNull]] if no laser target exists


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


| [[cursorTarget]], [[setMissileTarget]] |SEEALSO=
|s2since= arma3 2.12
}}
 
|p21= vehicle: [[Object]] - transport
 
|p22= turret: [[Array]] format [[Turret Path]]
 
|r2= [[Object]] - laser target or [[objNull]] if no laser target exists
 
|x1= <sqf>private _target = laserTarget gunner heli;</sqf>


<h3 style="display:none">Bottom Section</h3>
|x2= <sqf>private _designatedPos = getPosATL laserTarget player;</sqf>


[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
|seealso= [[isLaserOn]] [[cursorTarget]] [[setMissileTarget]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
}}
{{GameCategory|arma3|Scripting Commands}}
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]

Latest revision as of 21:11, 29 August 2022

Hover & click on the images for description

Description

Description:
Returns the laser target object created by given unit (vehicle or soldier) when using a laser targeting device. The main syntax targets the primary gunner turret.
Groups:
Weapons

Syntax

Syntax:
laserTarget entity
Parameters:
entity: Object - unit or vehicle
Return Value:
Object - laser target or objNull if no laser target exists

Alternative Syntax

Syntax:
vehicle laserTarget turret
Parameters:
vehicle: Object - transport
turret: Array format Turret Path
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:
isLaserOn cursorTarget setMissileTarget

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