enableGunLights: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Some wiki formatting)
m (Text replacement - "{{Feature|Important|" to "{{Feature|important|")
 
(10 intermediate revisions by the same user not shown)
Line 24: Line 24:
|s1= target [[enableGunLights]] state
|s1= target [[enableGunLights]] state


|p1= target: [[Group]] or [[Object]] - The group forced to use gun lights. If unit is supplied as argument, unit's group is used
|p1= target: [[Group]] or [[Object]] - the group forced to use gun lights. If unit is supplied as argument, unit's group is used


|p2= state: [[Boolean]] - [[true]] to enable, [[false]] to disable
|p2= state: [[Boolean]] - [[true]] to enable, [[false]] to disable
Line 30: Line 30:
|r1= [[Nothing]]
|r1= [[Nothing]]


|x1= <code>_group [[enableGunLights]] [[false]];</code>
|x1= <sqf>_group enableGunLights false;</sqf>


|seealso= [[isFlashlightOn]]
|seealso= [[isFlashlightOn]]
Line 51: Line 51:
|descr= Toggles the target group's gun lights. [[disableAI]] "LIGHTS" will disable the use of gun lights.
|descr= Toggles the target group's gun lights. [[disableAI]] "LIGHTS" will disable the use of gun lights.


{{Feature|Important|Do not enable gun lights in a loop for every unit in a group, this command will do this for you automatically, you only need to give either a [[Group]] or [[Object]], which is any unit from the group, as an argument.}}
{{Feature|important|This command acts on each unit of the provided group or provided unit's group; there is no need to apply it on each unit.}}




|s1= target [[enableGunLights]] mode
|s1= target [[enableGunLights]] mode


|p1= target: [[Group]] or [[Object]] - The group forced to use gun lights. If unit is supplied as argument, unit's group is used
|p1= target: [[Group]] or [[Object]] - the group forced to use gun lights. If unit is supplied as argument, unit's group is used


|p2= mode: [[String]] - Can be:
|p2= mode: [[String]] - can be:
* <tt>"Auto"</tt> - Depends on combat mode  
* {{hl|"Auto"}} - Depends on combat mode  
* <tt>"ForceOn"</tt> - Always on
* {{hl|"ForceOn"}} - Always on
* <tt>"ForceOff"</tt> - Always off
* {{hl|"ForceOff"}} - Always off


|r1= [[Nothing]]
|r1= [[Nothing]]


|x1= <code>_unit [[enableGunLights]] "Auto";</code>
|x1= <sqf>_groupA enableGunLights "Auto";</sqf>


|x2= <code>_unit [[enableGunLights]] "ForceOff";</code>
|x2= <sqf>_unit1 enableGunLights "ForceOff"; // sets _unit1's GROUP behaviour to not use gun lights</sqf>


|seealso= [[isFlashlightOn]], [[enableIRLasers]]
|seealso= [[isFlashlightOn]] [[enableIRLasers]]
}}
}}


}}
}}

Latest revision as of 00:23, 2 February 2024

A2 OA Logo.png Arma 2: Operation Arrowhead to tkoh logo small.png Take On Helicopters
Arma 3 logo black.png Arma 3
Hover & click on the images for description

Description

Description:
Toggles the target group's gun light(s).
Groups:
LightsWeapons

Syntax

Syntax:
target enableGunLights state
Parameters:
target: Group or Object - the group forced to use gun lights. If unit is supplied as argument, unit's group is used
state: Boolean - true to enable, false to disable
Return Value:
Nothing

Examples

Example 1:
_group enableGunLights false;

Additional Information

See also:
isFlashlightOn

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
Hover & click on the images for description

Description

Description:
Toggles the target group's gun lights. disableAI "LIGHTS" will disable the use of gun lights.
This command acts on each unit of the provided group or provided unit's group; there is no need to apply it on each unit.
Groups:
LightsWeapons

Syntax

Syntax:
target enableGunLights mode
Parameters:
target: Group or Object - the group forced to use gun lights. If unit is supplied as argument, unit's group is used
mode: String - can be:
  • "Auto" - Depends on combat mode
  • "ForceOn" - Always on
  • "ForceOff" - Always off
Return Value:
Nothing

Examples

Example 1:
_groupA enableGunLights "Auto";
Example 2:
_unit1 enableGunLights "ForceOff"; // sets _unit1's GROUP behaviour to not use gun lights

Additional Information

See also:
isFlashlightOn enableIRLasers

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