Arma 3 Scripting

Command in Weapons

isLaserOn

Also available as Markdown and JSON, or read the original wiki page.

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.

Syntax

Syntax 1

isLaserOn entity

Parameters:

Returns: Boolean - true when laser is on, false otherwise

Syntax 2

since Arma3 2.12

vehicle isLaserOn turret

Parameters:

Returns: Boolean - true when laser is on, false otherwise

Examples

Example 1

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

See also

laserTarget · enableIRLasers · isIRLaserOn

Community notes

Sa-Matra

Does not mean there is actual laser object present. Returns laser designator weapon's toggle state. In other words isLaserOn can return true while laserTarget returns <NULL-object>, for example in case laser was turned on and unit left the vehicle, there would be no laser target entity anymore, while designator is still turned on.