Ares
Ares copied to clipboard
Add generic 'turn on lights', 'turn off lights' and 'lights auto' commands to make units turn on headlights and laser pointers
Works with laser pointers now, but headlights are wonk. Something like the following ALMOST works, except it makes the headlights flicker:
{
_vehicle = vehicle _x;
if ((_x in vehicle _vehicle) && (driver _vehicle == _x)) then
{
null = [_x] spawn
{
_driver = _this select 0;
_driver setVariable ["forceLightsState", "on"];
while {alive _driver && (_driver getVariable["forceLightsState", "auto"] == "on")} do
{
_driver action ["lightOn", (vehicle _driver)];
sleep 0.01;
};
};
};
} foreach (units _group);
This might be possible with the new light commands from 1.32.
From what I can tell keeping vehicle lights off was previously impossible. In stealth and combat states though, most vehicles keep their lights off. I messed with this on the mission on Saturday and had no luck.