Ares icon indicating copy to clipboard operation
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

Open astruyk opened this issue 10 years ago • 3 comments

astruyk avatar Sep 03 '14 18:09 astruyk

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);

astruyk avatar Sep 06 '14 20:09 astruyk

This might be possible with the new light commands from 1.32.

astruyk avatar Oct 21 '14 02:10 astruyk

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.

TheOtherTaylor avatar Oct 21 '14 17:10 TheOtherTaylor