laserTarget: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \| *(\[\[[a-zA-Z ]+\]\].+) \|x1=" to " |r1=$1 |x1=")
m (Some wiki formatting)
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| arma2oa
|game1= arma2oa
|version1= 1.50


|1.51
|game2= tkoh
|version2= 1.00
 
|game3= arma3
|version3= 0.50


|arg= global
|arg= global
Line 9: Line 14:
|gr1= Weapons
|gr1= Weapons


| Returns laser target object created by given unit (vehicle or soldier) when using a laser targeting device.
|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.
 
|s1= [[laserTarget]] entity
 
|p1= entity: [[Object]] - unit or vehicle
 
|r1= [[Object]] - laser target or [[objNull]] if no laser target exists


| [[laserTarget]] unitName
|s2= vehicle [[laserTarget]] turret


|p1= unitName: [[Object]]
|s2since= arma3 2.12


|r1=[[Object]] - laser target or [[objNull]] if no laser target exists
|p21= vehicle: [[Object]] - transport


|x1= <code>[[private]] _target = [[laserTarget]] [[gunner]] heli;</code>
|p22= turret: [[Array]] format [[Turret Path]]


|x2= <code>[[private]] _designatedPos = [[getPosATL]] [[laserTarget]] [[player]]; </code>
|r2= [[Object]] - laser target or [[objNull]] if no laser target exists


|seealso= [[cursorTarget]], [[setMissileTarget]]
|x1= <sqf>private _target = laserTarget gunner heli;</sqf>
}}


|x2= <sqf>private _designatedPos = getPosATL laserTarget player;</sqf>


{{GameCategory|arma2|Scripting Commands}}
|seealso= [[isLaserOn]] [[cursorTarget]] [[setMissileTarget]]
{{GameCategory|arma3|Scripting Commands}}
}}
{{GameCategory|tkoh|Scripting Commands}}

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