skip large blue spark on objects
This commit is contained in:
@@ -8,7 +8,7 @@ if (!hasInterface) exitWith {};
|
|||||||
params [["_object", objNull, [objNull]]];
|
params [["_object", objNull, [objNull]]];
|
||||||
if (isNull _object) exitWith {};
|
if (isNull _object) exitWith {};
|
||||||
|
|
||||||
// if player is within object view distance of the object, flicker the lights
|
// flicker the lights
|
||||||
private _flickerHandle = [_object] spawn {
|
private _flickerHandle = [_object] spawn {
|
||||||
params ["_object"];
|
params ["_object"];
|
||||||
for "_i" from 1 to 3 do {
|
for "_i" from 1 to 3 do {
|
||||||
@@ -23,51 +23,57 @@ private _flickerHandle = [_object] spawn {
|
|||||||
|
|
||||||
_object setVariable [QGVAR(flickerHandle), _flickerHandle];
|
_object setVariable [QGVAR(flickerHandle), _flickerHandle];
|
||||||
|
|
||||||
// sound
|
[{scriptDone (_this getVariable QGVAR(flickerHandle));}, {
|
||||||
private _spark_sound = selectRandom (keys GVAR(zapSounds));
|
private _object = _this;
|
||||||
private _sparkSoundData = GVAR(zapSounds) get _spark_sound;
|
|
||||||
playSound3D [_sparkSoundData get "filename", _object, false, getPosASL _object, _sparkSoundData get "volume", _sparkSoundData get "pitch", 75, 0, true];
|
|
||||||
|
|
||||||
// particle effect
|
// sound
|
||||||
private _e_static = "#particlesource" createVehicleLocal (getPosATL _object);
|
// private _spark_sound = selectRandom (keys GVAR(zapSounds));
|
||||||
_e_static setParticleCircle [1, [0, 0, 0]];
|
// private _sparkSoundData = GVAR(zapSounds) get _spark_sound;
|
||||||
_e_static setParticleRandom [0.2, [1.5,1.5,0], [0.175, 0.175, 0], 0.15, 0.2, [0, 0, 0, 1], 1, 0];
|
// playSound3D [_sparkSoundData get "filename", _object, false, getPosASL _object, _sparkSoundData get "volume", _sparkSoundData get "pitch", 75, 0, true];
|
||||||
_e_static setParticleParams [["\A3\data_f\blesk1", 1, 0, 1], "", "SpaceObject", 1, 0.05, [0, 0, 0], [0, 0, 0], 0, 10, 7.9,0, [0.01, 0.02, 0.01], [[1, 1, 0.1, 1], [1, 1, 1, 1]], [0.025], 1, 0, "", "", _object,0,false,-1,[[100,100,100,1],[0,0,1,0.01]]];
|
|
||||||
_e_static setDropInterval 0.025;
|
|
||||||
|
|
||||||
[{deleteVehicle _this;}, _e_static, 1] call CBA_fnc_waitAndExecute;
|
// // particle effect, large blue spark
|
||||||
|
// private _e_static = "#particlesource" createVehicleLocal (getPosATL _object);
|
||||||
|
// _e_static setParticleCircle [1, [0, 0, 0]];
|
||||||
|
// _e_static setParticleRandom [0.2, [1.5,1.5,0], [0.175, 0.175, 0], 0.15, 0.2, [0, 0, 0, 1], 1, 0];
|
||||||
|
// _e_static setParticleParams [["\A3\data_f\blesk1", 1, 0, 1], "", "SpaceObject", 1, 0.05, [0, 0, 0], [0, 0, 0], 0, 10, 7.9,0, [0.01, 0.02, 0.01], [[1, 1, 0.1, 1], [1, 1, 1, 1]], [0.025], 1, 0, "", "", _object,0,false,-1,[[100,100,100,1],[0,0,1,0.01]]];
|
||||||
|
// _e_static setDropInterval 0.025;
|
||||||
|
|
||||||
|
// [{deleteVehicle _this;}, _e_static, 1] call CBA_fnc_waitAndExecute;
|
||||||
|
|
||||||
|
|
||||||
// play additional spark
|
// play additional spark
|
||||||
_bbr = boundingBoxReal vehicle _object;
|
_bbr = boundingBoxReal vehicle _object;
|
||||||
_p1 = _bbr select 0;
|
_p1 = _bbr select 0;
|
||||||
_p2 = _bbr select 1;
|
_p2 = _bbr select 1;
|
||||||
_maxHeight = abs ((_p2 select 2) - (_p1 select 2));
|
_maxHeight = abs ((_p2 select 2) - (_p1 select 2));
|
||||||
|
|
||||||
//_spark_poz_rel = [getPos _lamp select 0,getPos _lamp select 1,_maxHeight-0.5];
|
//_spark_poz_rel = [getPos _lamp select 0,getPos _lamp select 1,_maxHeight-0.5];
|
||||||
private _spark_poz_rel = (_maxHeight/2)-0.45;
|
private _spark_poz_rel = (_maxHeight/2)-0.45;
|
||||||
|
|
||||||
private _spark_type = ["white","orange"] call BIS_fnc_selectRandom;
|
private _spark_type = ["white","orange"] call BIS_fnc_selectRandom;
|
||||||
private _drop = 0.001+(random 0.05);
|
private _drop = 0.001+(random 0.05);
|
||||||
private _scantei_spark = "#particlesource" createVehicleLocal (getPosATL _object);
|
private _scantei_spark = "#particlesource" createVehicleLocal (getPosATL _object);
|
||||||
|
|
||||||
if (_spark_type=="orange") then
|
if (_spark_type=="orange") then
|
||||||
{
|
{
|
||||||
_scantei_spark setParticleCircle [0, [0, 0, 0]];
|
_scantei_spark setParticleCircle [0, [0, 0, 0]];
|
||||||
_scantei_spark setParticleRandom [1, [0.1, 0.1, 0.1], [0, 0, 0], 0, 0.25, [0, 0, 0, 0], 0, 0];
|
_scantei_spark setParticleRandom [1, [0.1, 0.1, 0.1], [0, 0, 0], 0, 0.25, [0, 0, 0, 0], 0, 0];
|
||||||
_scantei_spark setParticleParams [["\A3\data_f\proxies\muzzle_flash\muzzle_flash_silencer.p3d", 1, 0, 1], "", "SpaceObject", 1, 1, [0, 0,_spark_poz_rel], [0, 0, 0], 0, 15, 7.9, 0, [0.5,0.5,0.05], [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 0]], [0.08], 1, 0, "", "", _object,0,true,0.3,[[1,1,1,1]]];
|
_scantei_spark setParticleParams [["\A3\data_f\proxies\muzzle_flash\muzzle_flash_silencer.p3d", 1, 0, 1], "", "SpaceObject", 1, 1, [0, 0,_spark_poz_rel], [0, 0, 0], 0, 15, 7.9, 0, [0.5,0.5,0.05], [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 0]], [0.08], 1, 0, "", "", _object,0,true,0.3,[[1,1,1,1]]];
|
||||||
_scantei_spark setDropInterval _drop;
|
_scantei_spark setDropInterval _drop;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
//hint "alb";
|
//hint "alb";
|
||||||
_scantei_spark setParticleCircle [0, [0, 0, 0]];
|
_scantei_spark setParticleCircle [0, [0, 0, 0]];
|
||||||
_scantei_spark setParticleRandom [1, [0.05, 0.05, 0.1], [5, 5, 3], 0, 0.0025, [0, 0, 0, 0], 0, 0];
|
_scantei_spark setParticleRandom [1, [0.05, 0.05, 0.1], [5, 5, 3], 0, 0.0025, [0, 0, 0, 0], 0, 0];
|
||||||
_scantei_spark setParticleParams [["\A3\data_f\proxies\muzzle_flash\muzzle_flash_silencer.p3d", 1, 0, 1], "", "SpaceObject", 1, 1, [0, 0,_spark_poz_rel], [0, 0, 0], 0, 20, 7.9, 0, [0.5,0.5,0.05], [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 0]], [0.08], 1, 0, "", "", _object,0,true,0.3,[[5,5,3,1]]];
|
_scantei_spark setParticleParams [["\A3\data_f\proxies\muzzle_flash\muzzle_flash_silencer.p3d", 1, 0, 1], "", "SpaceObject", 1, 1, [0, 0,_spark_poz_rel], [0, 0, 0], 0, 20, 7.9, 0, [0.5,0.5,0.05], [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 0]], [0.08], 1, 0, "", "", _object,0,true,0.3,[[5,5,3,1]]];
|
||||||
_scantei_spark setDropInterval 0.001;
|
_scantei_spark setDropInterval 0.001;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private _spark_sound = selectRandom (keys GVAR(zapSounds));
|
||||||
|
private _sparkSoundData = GVAR(zapSounds) get _spark_sound;
|
||||||
|
playSound3D [_sparkSoundData get "filename", _object, false, getPosASL _object, _sparkSoundData get "volume", _sparkSoundData get "pitch", 75, 0, true];
|
||||||
|
|
||||||
|
[{deleteVehicle _this;}, _scantei_spark, 0.4 + (random 0.7)] call CBA_fnc_waitAndExecute;
|
||||||
|
}, _object] call CBA_fnc_waitUntilAndExecute;
|
||||||
|
|
||||||
private _spark_sound = selectRandom (keys GVAR(zapSounds));
|
|
||||||
private _sparkSoundData = GVAR(zapSounds) get _spark_sound;
|
|
||||||
playSound3D [_sparkSoundData get "filename", _object, false, getPosASL _object, _sparkSoundData get "volume", _sparkSoundData get "pitch", 75, 0, true];
|
|
||||||
|
|
||||||
[{deleteVehicle _this;}, _scantei_spark, 0.4 + (random 0.7)] call CBA_fnc_waitAndExecute;
|
|
||||||
Reference in New Issue
Block a user