skip large blue spark on objects
This commit is contained in:
@@ -8,7 +8,7 @@ if (!hasInterface) exitWith {};
|
||||
params [["_object", objNull, [objNull]]];
|
||||
if (isNull _object) exitWith {};
|
||||
|
||||
// if player is within object view distance of the object, flicker the lights
|
||||
// flicker the lights
|
||||
private _flickerHandle = [_object] spawn {
|
||||
params ["_object"];
|
||||
for "_i" from 1 to 3 do {
|
||||
@@ -23,19 +23,22 @@ private _flickerHandle = [_object] spawn {
|
||||
|
||||
_object setVariable [QGVAR(flickerHandle), _flickerHandle];
|
||||
|
||||
[{scriptDone (_this getVariable QGVAR(flickerHandle));}, {
|
||||
private _object = _this;
|
||||
|
||||
// sound
|
||||
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];
|
||||
// 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];
|
||||
|
||||
// particle effect
|
||||
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;
|
||||
// // 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;
|
||||
// [{deleteVehicle _this;}, _e_static, 1] call CBA_fnc_waitAndExecute;
|
||||
|
||||
|
||||
// play additional spark
|
||||
@@ -71,3 +74,6 @@ 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;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user