setPilotLight: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "|arg= local |= " to "|arg= local |MPARGUMENTS= ") |
Lou Montana (talk | contribs) m (Add Category:Command Group: Lights) |
||
Line 13: | Line 13: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| vehicle | | vehicle [[setPilotLight]] set |SYNTAX= | ||
|p1= vehicle: [[Object | |p1= vehicle: [[Object]] |PARAMETER1= | ||
| [[ | |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= | ||
| | | |MPBEHAVIOUR= | ||
}} | }} | ||
Line 40: | Line 38: | ||
<h3 style='display:none'>Bottom Section</h3> | <h3 style='display:none'>Bottom Section</h3> | ||
[[Category: | [[Category:Command Group: Lights]] | ||
<!-- 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>{{ | <code>{{cc|Workaround - Put in object init field}} | ||
this [[setPilotLight]] true; this [[setCollisionLight]] true; | 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 00:19, 20 July 2020
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
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; };