isLaserOn: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Some wiki formatting)
No edit summary
Line 10: Line 10:
|gr1= Weapons
|gr1= Weapons


|descr= Returns true if the vehicle has its laser turned on. Not to be confused with [[isIRLaserOn]] which is for units.
|descr= Returns true if the vehicle has its laser turned on. Not to be confused with [[isIRLaserOn]] which is for units. Main syntax is for primary gunner turret.


|s1= [[isLaserOn]] vehicle
|s1= [[isLaserOn]] entity
 
|p1= entity: [[Object]] - unit or vehicle
 
|r1= [[Boolean]] - [[true]] when laser is on, [[false]] otherwise
 
|s2= vehicle [[isLaserOn]] turret
|s2since=Arma3 2.12
|p21= vehicle: [[Object]] - transport
|p22= turret: [[Array]] - turret path, [-1] for driver turret
 
|r2= [[Boolean]] - [[true]] when laser is on, [[false]] otherwise


|p1= vehicle: [[Object]]


|x1= <sqf>if (isLaserOn _vehicle) then { hint "target ready" };</sqf>
|x1= <sqf>if (isLaserOn _vehicle) then { hint "target ready" };</sqf>


|r1= [[Boolean]] - [[true]] when laser is on, [[false]] otherwise
|seealso= [[laserTarget]] [[enableIRLasers]] [[isIRLaserOn]]
 
|seealso= [[enableIRLasers]] [[isIRLaserOn]]
}}
}}

Revision as of 19:22, 29 August 2022

Hover & click on the images for description

Description

Description:
Returns true if the vehicle has its laser turned on. Not to be confused with isIRLaserOn which is for units. Main syntax is for primary gunner turret.
Groups:
Weapons

Syntax

Syntax:
isLaserOn entity
Parameters:
entity: Object - unit or vehicle
Return Value:
Boolean - true when laser is on, false otherwise

Alternative Syntax

Syntax:
vehicle isLaserOn turret
Parameters:
vehicle: Object - transport
turret: Array - turret path, [-1] for driver turret
Return Value:
Boolean - true when laser is on, false otherwise

Examples

Example 1:
if (isLaserOn _vehicle) then { hint "target ready" };

Additional Information

See also:
laserTarget enableIRLasers isIRLaserOn

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