neon lights for cars

ok tested and is working:

neonlight.sqf
Code:
private ["_vehicle"];

_vehicle = _this select 3;

            _lightArea = createVehicle ["#lightpoint", (position _vehicle), [], 0, 'CAN_COLLIDE'];
            _lightArea setLightColor [0.5,0,0]; //[0.1,0.005,0.005];
            _lightArea setLightAmbient [0.2,0.01,0.01];
            _lightArea setLightBrightness 0.05;
            _lightArea lightAttachObject [_vehicle, [0,0,-0.5]];

            //Spark Light
            /*
            _lightSpark = "#lightpoint" createVehicleLocal (getPosATL _vehicle);
            _lightSpark setLightColor [0.1,0.1,0.1];
            _lightSpark setLightAmbient [0.05,0.05,0.05];
            _lightSpark setLightBrightness 0.05;
            _lightSpark lightAttachObject [_vehicle, [0,0,0]];
            */
           
            while {alive _vehicle} do {
                _lightArea setLightAmbient [((random 0.2) + 0.2),0.01,0.01];
                //_lightArea setLightColor [((random 0.1) + 0.1),0.005,0.005];
                sleep (random 0.1);
            };
            deleteVehicle _lightArea;
            //deleteVehicle _lightSpark;

Just need to make some changes here and there, so the light behaves more like a neon light, but for the start it should be enough.
Also there is no option to switch off the light, just to make them more/brighter ^^
But for the start it should be enough i think :)

Also change

Code:
ArmoredSUV_Base_PMC
to
Code:
SUV_Base_EP1

Since ArmoredSUV_Base_PMC is only the Armored SUV ^^

Make this think working :cool:
 
ok tested and is working:

neonlight.sqf
Code:
private ["_vehicle"];

_vehicle = _this select 3;

            _lightArea = createVehicle ["#lightpoint", (position _vehicle), [], 0, 'CAN_COLLIDE'];
            _lightArea setLightColor [0.5,0,0]; //[0.1,0.005,0.005];
            _lightArea setLightAmbient [0.2,0.01,0.01];
            _lightArea setLightBrightness 0.05;
            _lightArea lightAttachObject [_vehicle, [0,0,-0.5]];

            //Spark Light
            /*
            _lightSpark = "#lightpoint" createVehicleLocal (getPosATL _vehicle);
            _lightSpark setLightColor [0.1,0.1,0.1];
            _lightSpark setLightAmbient [0.05,0.05,0.05];
            _lightSpark setLightBrightness 0.05;
            _lightSpark lightAttachObject [_vehicle, [0,0,0]];
            */
          
            while {alive _vehicle} do {
                _lightArea setLightAmbient [((random 0.2) + 0.2),0.01,0.01];
                //_lightArea setLightColor [((random 0.1) + 0.1),0.005,0.005];
                sleep (random 0.1);
            };
            deleteVehicle _lightArea;
            //deleteVehicle _lightSpark;

Just need to make some changes here and there, so the light behaves more like a neon light, but for the start it should be enough.
Also there is no option to switch off the light, just to make them more/brighter ^^
But for the start it should be enough i think :)

Also change

Code:
ArmoredSUV_Base_PMC
to
Code:
SUV_Base_EP1

Since ArmoredSUV_Base_PMC is only the Armored SUV ^^

Make this think working :cool:






thankyou so how do i go about installing it put this code in neonlight.sqf then call it from init.sqf or selfactions


like so ?

if (_inVehicle && (_vehicle isKindOf "SUV_Base_EP1")) then { //only SUV will get this option
if (schwedes_neonlight < 0) then {
schwedes_neonlight = _vehicle addAction ["Neon Light","custom\neonlight.sqf",_vehicle,5,false,true];
};
} else {
_vehicle removeAction schwedes_neonlight;
schwedes_neonlight = -1;
};
 
just change some numbers here and there:

Code:
_lightArea setLightColor [0.5,0,0]; //[0.1,0.005,0.005];
            _lightArea setLightAmbient [0.2,0.01,0.01];

also try to set the brightness so it fits to a neon light.
Another point is there is no option to switch off the light ^^
 
ah i see wot about getting code to put out flares like you can in game when u walk up to them dunno if that would help putting them out as in a turn off option

looks pretty dam good to me as a start just added smoke option to vehicles too for bit of fun ^_^
 
Back
Top