Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Author: Karel Moricky edit by KiloSwiss
- Original script: BIS_fnc_moduleLightning
- Description:
- Non-Lethal Zeus lightning strike
- Parameter(s):
- _target : The target Object (does not take damage).
- Returns:
- NONE
- */
- params [ ["_target", objNull, [objNull]] ];
- if (isNull _target) exitWith {};
- private _pos = getPosATL _target;
- /*
- soundHit1[] = {"\A3\Sounds_F\ambient\thunder\thunder_02",10,1,3000};
- soundHit2[] = {"\A3\Sounds_F\ambient\thunder\thunder_03",10,1,3000};
- soundHit3[] = {"\A3\Sounds_F\ambient\thunder\thunder_06",10,1,3000};
- */
- private _sound = selectRandom ["soundHit1","soundHit2","soundHit3"];
- getArray(configfile >> "CfgAmmo" >> "LightningBolt" >> _sound) params ["_path","_volume","_pitch","_distance"];
- _path = _path select [1, count _path];
- _sound = format["%1.wss", _path];
- playSound3D [_sound, _target, false, ATLtoASL _pos, _volume, _pitch, _distance];
- [_pos] spawn
- {
- params ["_pos"];
- private _light = "#lightpoint" createvehicle _pos;
- _light setposatl [_pos select 0,_pos select 1,(_pos select 2) + 10];
- _light setLightDayLight true;
- _light setLightBrightness 300;
- _light setLightAmbient [0.05, 0.05, 0.1];
- _light setlightcolor [1, 1, 2];
- uisleep 0.1;
- _light setLightBrightness 0;
- uisleep (random 0.1);
- private _class = selectRandom ["lightning1_F","lightning2_F"];
- private _lightning = _class createvehicle [100,100,100];
- _lightning setDir (random 3600);
- _lightning setPos _pos;
- for "_i" from 0 to 1 do {
- _light setLightBrightness (100 + random 100);
- uisleep 0.1;
- };
- deletevehicle _lightning;
- deletevehicle _light;
- //--- Disable engine lightnings
- 0 setlightnings 0;
- };
Advertisement
Add Comment
Please, Sign In to add comment