laserTarget: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 14: Line 14:
|gr1= Weapons
|gr1= Weapons


|descr= Returns laser target object created by given unit (vehicle or soldier) when using a laser targeting device.
|descr= Returns laser target object created by given unit (vehicle or soldier) when using a laser targeting device. Main syntax is for primary gunner turret.


|s1= [[laserTarget]] unitName
|s1= [[laserTarget]] entity


|p1= unitName: [[Object]]
|p1= entity: [[Object]] - unit or vehicle


|r1= [[Object]] - laser target or [[objNull]] if no laser target exists
|r1= [[Object]] - laser target or [[objNull]] if no laser target exists
|s2= vehicle [[laserTarget]] turret
|s2since=Arma3 2.12
|p21= vehicle: [[Object]] - transport
|p22= turret: [[Array]] - turret path, [-1] for driver turret
|r2= [[Object]] - laser target or [[objNull]] if no laser target exists


|x1= <sqf>private _target = laserTarget gunner heli;</sqf>
|x1= <sqf>private _target = laserTarget gunner heli;</sqf>

Revision as of 19:19, 29 August 2022

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. Main syntax is for 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 - turret path, [-1] for driver turret
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