setPilotLight: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|arg= local |= " to "|arg= local |MPARGUMENTS= ")
Line 13: Line 13:
____________________________________________________________________________________________
____________________________________________________________________________________________


| vehicle '''setPilotLight''' set |SYNTAX=
| vehicle [[setPilotLight]] set |SYNTAX=


|p1= vehicle: [[Object]]  |PARAMETER1=
|p1= vehicle: [[Object]]  |PARAMETER1=
|p2= set: [[Boolean]]  |PARAMETER1=  


| [[Nothing]] |RETURNVALUE=  
|p2= set: [[Boolean]] |PARAMETER2=


| [[Nothing]] |RETURNVALUE=


|x1= <code>car [[setPilotLight]] [[true]];</code>|EXAMPLE1=
|x1= <code>car [[setPilotLight]] [[true]];</code>|EXAMPLE1=  


____________________________________________________________________________________________
____________________________________________________________________________________________


| [[isLightOn]], [[isCollisionLightOn]], [[setCollisionLight]], [[isIRLaserOn]] |SEEALSO=  
| [[isLightOn]], [[isCollisionLightOn]], [[setCollisionLight]], [[isIRLaserOn]] |SEEALSO=


| |MPBEHAVIOUR=  
| |MPBEHAVIOUR=
____________________________________________________________________________________________
}}
}}


Line 40: Line 38:


<h3 style='display:none'>Bottom Section</h3>
<h3 style='display:none'>Bottom Section</h3>
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Command Group: Lights]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
 
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]


<!-- CONTINUE Notes -->
<!-- CONTINUE Notes -->
Line 50: Line 47:
<dd class="note">
<dd class="note">
This command will not work when using [[enableSimulation]] FALSE before this command is executed. However collision lights still do using [[setCollisionLight]].
This command will not work when using [[enableSimulation]] FALSE before this command is executed. However collision lights still do using [[setCollisionLight]].
<code>{{codecomment|// Workaround - Put in object init field}}
<code>{{cc|Workaround - Put in object init field}}
this [[setPilotLight]] true; this [[setCollisionLight]] true; 0 [[=]] [this] [[spawn]] {[[sleep]] 0.001; (_this [[select]] 0) [[enableSimulation]] false;};
this [[setPilotLight]] true;
this [[setCollisionLight]] true;
[this] [[spawn]] {
[[sleep]] 0.001;
(_this [[select]] 0) [[enableSimulation]] false;
};
</code>
</code>
</dd>
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->
<!-- DISCONTINUE Notes -->

Revision as of 01:19, 20 July 2020

Hover & click on the images for description

Description

Description:
Switches headlights of a vehicle on/off. Note that the vehicle has to be local, for global variant use Arma 3 Actions "LightOn"/"LightOff"
Groups:
Uncategorised

Syntax

Syntax:
vehicle setPilotLight set
Parameters:
vehicle: Object
set: Boolean
Return Value:
Nothing

Examples

Example 1:
car setPilotLight true;

Additional Information

See also:
isLightOnisCollisionLightOnsetCollisionLightisIRLaserOn

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

Notes

Bottom Section


Posted on September 28, 2018 - 04:03 (UTC)
HazJ
This command will not work when using enableSimulation FALSE before this command is executed. However collision lights still do using setCollisionLight. // Workaround - Put in object init field this setPilotLight true; this setCollisionLight true; [this] spawn { sleep 0.001; (_this select 0) enableSimulation false; };