Lights – Arma 3
Vehicle Lights
Overview
Headlights
If a vehicle has headlights, they are usually available for the driver of the vehicle and if the driver is a human player, the headlights could be operated via keyboard binding (normally L) or scroll action menu. If the driver is AI, it will operate the headlights depending on some preset condition. For example it will turn the lights at night and turn them off in the day time. The exact time when AI may decide to use the lights is slightly randomized.
From scripts the headlights could be operated via either the script command setPilotLight or the actions "LightOn" and "LightOff". If a human player is the driver/pilot, the commands will work unconditionally. However if AI is driving or piloting, then it might resist lights status change.
Overriding
Config Related
It is possible to set initial state of the headlights in a vehicle config, so that when vehicle is spawned it has headlights either on or off.
class CfgVehicles
{
...
class MyVehicle
{
...
pilotLight = true; // true - to spawn with headlights on, false - spawn with headlights off. Default: false;
...
};
...
};
Collision Lights
Overriding
Config Related
It is possible to set initial state of the collision lights in a vehicle config, so that when vehicle is spawned it has collision lights either on or off.
class CfgVehicles
{
...
class MyVehicle
{
...
collisionLight = true; // true - to spawn with collision lights on, false - spawn with collision lights off. Default: false;
...
};
...
};