Search the Community
Showing results for tags 'Lightning'.
Found 5 results
-
Trigger lightning module at random interval over time
Irishcream216 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
First post here, long time lurker. I used the search function but was unable to find a solution to the problem at hand. I appreciate any advice. As the title suggests, I am attempting to generate a "ring of lightning" around an object for a cinematic effect. I am using the ZEUS lightning bolt modules in 3den, placed in a circle around said object. What I would like to happen is as follows: When the player(s) get within a certain range, the trigger(s) will activate the array of modules (one at a time, in quick succession) at random(z1 - z16), for a certain amount of time. When that time expires, they will then ALL fire at once for a brilliant flash finale. It sounds simple on the surface, but I cannot for the life of me get them to fire at random, even adjusting the trigger timer. After a set interval, they all fire at once. I have tried using multiple triggers in groups, and even having a separate trigger for each module covering an area of 250m radius each, centered on exactly the same point. I am VERY new to scripting, but previously have been able to do things without calling a function or a script from SQF. please advise, and thank you. -Irish -
I have an ongoing lightning/shadow glitch ever since the release of 0.9.6. Nights don't appear dark to me, they are just as light as days, only with the sky turning black. Hack, I can even see better at night than at day, cause all the shadows are gone aswell. Here are some screenshots: Screenshot1 Screenshot2 Screenshot3 I've tried everything: verifying the integrity of the game files, reinstalling the game several times, deleting all the mods and my game-profile files, even reinstaling my GPU drivers. Nothing helped though. Does anyone know how to fix it? Any Ideas??!
-
not 100% working as intended. basic run out of ammo,you get the option to suicide. lightning comes down and strikes you dead. *not 100% working as intended = at player death I'm guessing he is out of ammo so he gets the option to suicide. I won't be working on this project anymore( or at this time) but maybe someone will like it and want to continue. https://1drv.ms/u/s!Ai6aUdL_pIZqgZITGPMt27JkHi9iJQ credits duda (original structure of config) MADT (helping me) zonekiller (always my backbone for info)
- 1 reply
-
- 2
-
- server side mod
- suicide
-
(and 1 more)
Tagged with:
-
looking to add count ammo to my script, need help
dr death jm posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'm making a new script/server side addon for suicide, as it is , it works awesome but I need a way to count ammo so when player is at 0 ammo he can get the suicide action, as it is now it can be done at any time and as fun as it is , players will tend to use the action menu instead of playing mission. :rolleyes: lightning_Install = { if(!isNil "lightning_INIT") exitWith {}; lightning_INIT = true; lightning_suicide = { if (!alive player) exitWith {}; params ["_target","_turntable","_logic"]; _turntable = createVehicle ["Land_PenBlack_F",_this select 0,[],0,"CAN_COLLIDE"]; _turntable hideObjectGlobal true; _center = createCenter sideLogic; _group = createGroup _center; _logic = _group createUnit ["LOGIC",[0,0,0], [], 0, ""]; _logic attachTo [_turntable, [0,0,0.5]]; _logic setPos (getPos _target); [_logic, nil, true] call BIS_fnc_moduleLightning; }; lightning_Add_Player_Actions = { params ["_player"]; _player addAction ["<img size='3' color='#33339b' shadow='1' image='\A3\ui_f\data\map\respawn\icon_dead_ca' /><t size='1' shadow='1' color=""#f72032"">" + ("Electrifying Death") + "</t><img size='3' color='#33339b' shadow='1' image='\A3\ui_f\data\map\respawn\icon_dead_ca.paa'/>", {_this spawn lightning_suicide}, [], -9, false, true, "", "(vehicle player) isKindOf 'man'"]; _player addEventHandler ["Respawn", { player setVariable ["lightning_Actions_Loaded",false]; }]; }; if(!isDedicated) then { [] spawn { while {true} do { if(!isNull player && isPlayer player) then { if !(player getVariable ["lightning_Actions_Loaded",false]) then { [player] call lightning_Add_Player_Actions; player setVariable ["lightning_Actions_Loaded",true]; }; }; sleep 5; }; }; }; if(isServer) then { publicVariable "lightning_Install"; remoteExecCall ["lightning_Install", -2,true]; }; }; if(isServer) then { [] call lightning_Install; }; thanks. credits to duda for showing me all the how to and giving me time. -
Problem description: The below script is unable to spawn Lightning1_F.p3d and Lightning2_F.p3d files on an if (isServer) then {} condition yet called from debug console via Local execution or Global Execution it works. Is there anyway I could do this? The kind of error I see is the following. a3\data_f_curator\misc\lightning1.p3d: No geometry and no visual shape a3\data_f_curator\misc\lightning2.p3d: No geometry and no visual shape function names: RS_fnc_ThunderGenerator; RS_fnc_CreateLightningBolt; RS_fnc_createLightPoint; Call stack: [true] spawn RS_fnc_ThunderGenerator -> [randomised direction, X axis displacement, Y Axis Displacement,Z Axis Displacement] call RS_fnc_createLightningBolt; LightningBolt is used for reference from which the [X axis displacement, Y Axis Displacement,Z Axis Displacement] call RS_fnc_createLightpoint At which point the code then executes the playSound3D from the references to the vehicle Objects. Thunder generator loop: private ["_randomDisplacement","_randomX","_randomY","_ChanceOfSpawnRepeat" ,"_totalPlayerList","_randomlySelectedPlayer"]; _ActiveThunder = _this select 0; while {_ActiveThunder} do { if (isServer) then { if ((overcast > 0.7) && (rain > 0.6)) then { 0 setLightnings 0; _totalPlayerList = allPlayers; _randomPlayer = _totalPlayerList call BIS_fnc_selectRandom; diag_log format ["Random player was selected successfully %1",_randomPlayer]; _center = getPos _randomPlayer; diag_log format ["Random player Pos %1",_center]; _dir = floor(random 360); diag_log format ["Random player Obj Dir %1",_center]; _strikeCenter = _center; diag_log format ["Random player Obj StrikeCenter Is %1",_strikeCenter]; _RandomDisplacementValueX = floor(random 800); _RandomDisplacementValueY = floor(random 800); diag_log format ["Random Random Displacement X: %1",_RandomDisplacementValueX]; diag_log format ["Random Random Displacement Y: %1",_RandomDisplacementValueY]; _LimitValue = round(random 4); _RandomTimeFactor = [5,15] call BIS_fnc_randomInt; _AudibleDistance = [1500,2000] call BIS_fnc_randomInt; /* Thunder_01.wss (Medium Frequency) PitchLimit 3 - 2; VolumeLimit 3 - 12; Thunder_02.wss (Medium Frequency) PitchLimit 3; VolumeLimit 3 - 12; Thunder_03.wss (Highest Frequency) PitchLimit 0.80 - 1; VolumeLimit 3 - 12; Thunder_04.wss (Lowest Frequency) PitchLimit 0.90 - 1; VolumeLimit 3 - 12; thunder_05.wss (Lower Frequency) PitchLimit 0.85 - 1; VolumeLimit 3 - 11; thunder_06.wss (Higher Frequency) PitchLimit 0.90 - 1; VolumeLimit 3 - 12 */ _Thunder_01LimitsVolume = [8,12] call BIS_fnc_randomNum; _Thunder_02LimitsVolume = [8,12] call BIS_fnc_randomNum; _Thunder_03LimitsVolume = [8,12] call BIS_fnc_randomNum; _Thunder_04LimitsVolume = [8,15] call BIS_fnc_randomNum; _Thunder_05LimitsVolume = [8,13] call BIS_fnc_randomNum; _Thunder_06LimitsVolume = [8,12] call BIS_fnc_randomNum; _Thunder_01LimitsPitch = [2,3] call BIS_fnc_RandomNum; _Thunder_02LimitsPitch = [1,3] call BIS_fnc_randomNum; _Thunder_03LimitsPitch = [0.55,0.95] call BIS_fnc_randomNum; _Thunder_04LimitsPitch = [0.55,0.95] call BIS_fnc_randomNum; _Thunder_05LimitsPitch = [0.55,0.95] call BIS_fnc_randomNum; _Thunder_06LimitsPitch = [0.55,0.95] call BIS_fnc_randomNum; _SoundDataPool = ["A3\Sounds_f\ambient\thunder\thunder_01.wss", "A3\Sounds_f\ambient\thunder\thunder_02.wss", "A3\Sounds_f\ambient\thunder\thunder_03.wss", "A3\Sounds_f\ambient\thunder\thunder_04.wss", "A3\Sounds_f\ambient\thunder\thunder_05.wss", "A3\Sounds_f\ambient\thunder\thunder_06.wss"]; _testPos = [(_center select 0),(_center select 1),(_center select 2)]; diag_log format ["%1",_testPos]; _ChanceOfSpawnRepeat = random 1; _RepeatCount = round(random 3); _randomX = (_center select 0) + (_RandomDisplacementValueX - (2*_RandomDisplacementValueX)); _randomY = (_center select 1) + (_RandomDisplacementValueY - (2*_RandomDisplacementValueY)); diag_log format ["randomised X position : %1 randomised Y position : %2",_randomX,_randomY]; GRandomXY = [_randomX,_randomY]; publicVariable "GRandomXY"; if (_ChanceOfSpawnRepeat > 0.8) then { for [{_i=0},{_i <= _RepeatCount},{_i = _i + 1}] do { [_dir,_randomX,_randomY,_testPos select 2] call RS_fnc_createLightningBolt; [_dir,_randomX,_randomY,_testPos select 2] call RS_fnc_createLightPoint; diag_log format ["RandomX: %1, \n RandomY %2, \n BaseZ %3",_randomX,_randomY,_ChanceOfSpawnRepeat]; DistA = getPosATL _randomlySelectedPlayer distance [_randomX,_randomY,0]; if (round(DistA) <= 100) then { _HighestFreqCreateThun03 = _SoundDataPool select 2; playSound3D [_HighestFreqCreateThun03,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_03LimitsVolume,_Thunder_03LimitsPitch,_AudibleDistance]; }; if (round(DistA) <= 200) then { _HigherFreqCreateThun06 = _SoundDataPool select 5; playSound3D [_HigherFreqCreateThun06,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_06LimitsVolume,_Thunder_06LimitsPitch,_AudibleDistance]; }; if (round(DistA) <= 400) then { _MediumFreqCreateThun02 = _SoundDataPool select 1; playSound3D [_MediumFreqCreateThun02,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_02LimitsVolume,_Thunder_02LimitsPitch,_AudibleDistance]; }; if (round(DistA) <= 500) then { _MediumFreqCreateThun01 = _SoundDataPool select 0; playSound3D [_MediumFreqCreateThun01,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_01LimitsVolume,_Thunder_01LimitsPitch,_AudibleDistance]; }; if (round(DistA) <= 530) then { _LowerFreqCreateThun05 = _SoundDataPool select 4; playSound3D [_LowerFreqCreateThun05,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_05LimitsVolume,_Thunder_05LimitsPitch,_AudibleDistance]; }; if (round(DistA) <=700) then { _LowerFreqCreateThun04 = _SoundDataPool select 3; playSound3D [_LowerFreqCreateThun04,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_05LimitsVolume,_Thunder_05LimitsPitch,_AudibleDistance]; }; }; } else { [_dir,_randomX,_randomY,(_testPos select 2)] call RS_fnc_createLightningBolt; [_dir,_randomX,_randomY,(_testPos select 2)] call RS_fnc_createLightPoint; PV_LightningPos = [_randomX,_randomY,_testPos]; publicVariable "PV_LightningPos"; hint format ["%1",PV_LightningPos]; sleep _RandomTimeFactor; DistB = getPosATL player distance [_randomX,_randomY,0]; if (round(DistB) <= 100) then { _HighestFreqCreateThun03 = _SoundDataPool select 2; playSound3D [_HighestFreqCreateThun03,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_03LimitsVolume,_Thunder_03LimitsPitch,_AudibleDistance]; }; if (round(DistB) <= 200) then { _HigherFreqCreateThun06 = _SoundDataPool select 5; playSound3D [_HigherFreqCreateThun06,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_06LimitsVolume,_Thunder_06LimitsPitch,_AudibleDistance]; }; if (round(DistB) <= 400) then { _MediumFreqCreateThun02 = _SoundDataPool select 1; playSound3D [_MediumFreqCreateThun02,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_02LimitsVolume,_Thunder_02LimitsPitch,_AudibleDistance]; }; if (round(DistB) <= 500) then { _MediumFreqCreateThun01 = _SoundDataPool select 0; playSound3D [_MediumFreqCreateThun01,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_01LimitsVolume,_Thunder_01LimitsPitch,_AudibleDistance]; }; if (round(DistB) <= 530) then { _LowerFreqCreateThun05 = _SoundDataPool select 4; playSound3D [_LowerFreqCreateThun05,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_05LimitsVolume,_Thunder_05LimitsPitch,_AudibleDistance]; }; if (round(DistB) <= 700) then { _LoweestFreqCreateThun04 = _SoundDataPool select 3; playSound3D [_LoweestFreqCreateThun04,PV_LightningObject,false,getpos PV_LightningObject,_Thunder_04LimitsVolume,_Thunder_04LimitsPitch,_AudibleDistance]; }; PV_LightningPos = [_randomX,_randomY,_testPos]; publicVariable "PV_LightningPos"; hint format ["%1",PV_LightningPos]; sleep _RandomTimeFactor; }; }; }; }; Create Lightning Bolt: private ["_class","_LightningObj","_duration","_time"]; _class = ["Lightning1_F","Lightning2_F"] call bis_Fnc_selectrandom; _LightningObj = _class createVehicle [100,100,100]; _LightningObj setDir (_this select 0); _LightningObj setPosAtl [_this select 1,_this select 2,_this select 3]; _duration = random 3; for "_i" from 0 to _duration do { _time = time + 0.1; _LightningObj setLightBrightness (900 + random 100); waitUntil {time > _time}; }; PV_LightningObject = _LightningObj; Create Lightpoint: private ["_LightObj"]; diag_log format ["Passed location data: X: %1\n Y:%2 \n Z: %3",_this select 0,_this select 1,_this select 2,_this select 3]; _LightObj = "#lightpoint" createvehicleLocal [_this select 0,_this select 1,_this select 2]; _LightObj setposatl [_this select 0,_this select 1,_this select 2]; _LightObj setLightDayLight true; _LightObj setLightBrightness 300; _LightObj setLightAmbient [0.2, 0.2, 0.1]; _LightObj setlightcolor [1, 1, 3]; sleep 0.15; _LightObj setLightBrightness 0; sleep (random 0.15); PV_LightPointObject = _LightObj; publicVariable "PV_LightPointObject"; deleteVehicle _LightObj; Code Above Adapated from Shpook's Ambient Lightning Script. All code above is also subject to: https://www.bistudio.com/community/licenses/arma-public-license
-
- Weather
- simulation
-
(and 3 more)
Tagged with: