Jump to content

Search the Community

Showing results for tags 'weather'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • BOHEMIA INTERACTIVE
    • BOHEMIA INTERACTIVE - NEWS
    • BOHEMIA INTERACTIVE - JOBS
    • BOHEMIA INTERACTIVE - GENERAL
  • FEATURED GAMES
    • Vigor
    • DAYZ
    • ARMA 3
    • ARMA 2
    • YLANDS
  • MOBILE GAMES
    • ARMA MOBILE OPS
    • MINIDAYZ
    • ARMA TACTICS
    • ARMA 2 FIRING RANGE
  • BI MILITARY GAMES FORUMS
  • BOHEMIA INCUBATOR
    • PROJECT LUCIE
  • OTHER BOHEMIA GAMES
    • ARGO
    • TAKE ON MARS
    • TAKE ON HELICOPTERS
    • CARRIER COMMAND: GAEA MISSION
    • ARMA: ARMED ASSAULT / COMBAT OPERATIONS
    • ARMA: COLD WAR ASSAULT / OPERATION FLASHPOINT
    • IRON FRONT: LIBERATION 1944
    • BACK CATALOGUE
  • OFFTOPIC
    • OFFTOPIC
  • Die Hard OFP Lovers' Club's Topics
  • ArmA Toolmakers's Releases
  • ArmA Toolmakers's General
  • Japan in Arma's Topics
  • Arma 3 Photography Club's Discussions
  • The Order Of the Wolfs- Unit's Topics
  • 4th Infantry Brigade's Recruitment
  • 11th Marine Expeditionary Unit OFFICIAL | 11th MEU(SOC)'s 11th MEU(SOC) Recruitment Status - OPEN
  • Legion latina semper fi's New Server Legion latina next wick
  • Legion latina semper fi's https://www.facebook.com/groups/legionlatinasemperfidelis/
  • Legion latina semper fi's Server VPN LEGION LATINA SEMPER FI
  • Team Nederland's Welkom bij ons club
  • Team Nederland's Facebook
  • [H.S.O.] Hellenic Special Operations's Infos
  • BI Forum Ravage Club's Forum Topics
  • Exilemod (Unofficial)'s General Discussion
  • Exilemod (Unofficial)'s Scripts
  • Exilemod (Unofficial)'s Addons
  • Exilemod (Unofficial)'s Problems & Bugs
  • Exilemod (Unofficial)'s Exilemod Server tweaks
  • Exilemod (Unofficial)'s Promotion
  • Exilemod (Unofficial)'s Maps - Mission Files
  • TKO's Weferlingen
  • TKO's Chernarus
  • TKO's Livonia
  • TKO's Rules
  • TKO's Changelog
  • TKO's Help
  • TKO's What we Need
  • MSOF A3 Wasteland's Server Game Play Features
  • MSOF A3 Wasteland's Problems & Bugs
  • MSOF A3 Wasteland's Maps in Rotation
  • SOS GAMING's Server
  • SOS GAMING's News on Server
  • SOS GAMING's Regeln / Rules
  • SOS GAMING's Ghost-Town-Team
  • SOS GAMING's Steuerung / Keys
  • SOS GAMING's Div. Infos
  • SOS GAMING's Small Talk
  • NAMC's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Yahoo


Jabber (xmpp)


Skype


Biography


Twitter


Google+


Youtube


Vimeo


Xfire


Steam url id


Raptr


MySpace


Linkedin


Tumblr


Flickr


XBOX Live


PlayStation PSN


Origin


PlayFire


SoundCloud


Pinterest


Reddit


Twitch.Tv


Ustream.Tv


Duxter


Instagram


Location


Interests


Interests


Occupation

Found 12 results

  1. This page is for discussion of script features in Fly Tanoa Air. Mod page available now. Dev Files Current Version 0042 This download is compatible with APEX game version 1.7 and higher Live readMe [FTA] Guidebook
  2. Inspired by MKY's blizzard script, I created functions that provide you with climatological information. The functions contain a simple climatological model and statistical data, that I gathered from all kinds or sources on the web. The climatological data can be overriden by terrain makers, using config entires. I hope that this will contribute to the creation of weather addons, realism- and survival mods. Input is mostly limited to time, date and a position or object. Besides climatological data, the functions determine Latitude, time, date, overcast, fog, cloud occlusion, terrain occlusion, and object occlusion to calculate output values. The following variables are provided as output: * Air temperature (°C) – llw_fnc_getTemperature * Date and time (YYYY-MM-DD hh:mm:ss) – llw_fnc_getDateTime * Shadow detection (true/false) – llw_fnc_inShadow * Solar Azimuth angle (°) – llw_fnc_getSunAngle * Solar Elevation angle (°) – llw_fnc_getSunAngle * Solar Elevation angle at 12:00PM (°) – llw_fnc_getSunElevationNoon * Solar Radiation energy (W/m²) – llw_fnc_getSunRadiation * Sunrise time (hours) – llw_fnc_getSunRise * Sunset time (hours) – llw_fnc_getSunRise * Sea temperature (°C) – llw_fnc_getTemperature FUNCTIONS llw_fnc_getDateTime - TEXT: current date and time as "YYYY-MM-DD (hh:mm:ss)" llw_fnc_getSunAngle - ARRAY: (0) Solar Elevation angle and (1) Solar Azimuth angle. Current angles, or angles at a given time and date. llw_fnc_getSunElevationNoon - NUMBER: Solar Elevation Angle at 12:00AM llw_fnc_getSunRadiation - NUMBER: Solar radiation energy in W/m² at object or position. When a subclass of Man is referenced, torso is used as reference position. llw_fnc_getSunRise - ARRAY: (0) Time at sunrise and (1) time at sunset. For current day or for date provided in parameters. llw_fnc_getTemperature - ARRAY: (0) Air temperature and (1) sea temperature in degrees celcius. llw_fnc_inShadow - BOOLEAN: returns wheteher an object or position is shielded from the sun. When a subclass of Man is referenced, torso is used as reference position. Please refer to the enclosed README.TXT for further details. The scripts come with a demonstration script. (see screenshots) Download link: https://mega.nz/#!SwASwI7Y!WAQfpILWc-7HeTmBpdqPRoWWwfhajvsvCyjKI4aS7rU
  3. GEORGE FLOROS GR

    GF Breath Script

    GF Breath Script by GEORGE FLOROS [GR] Description: GF Breath Script , breath particles , for Cold weather conditions. You are free to do anything but i would like to give me Credits for this! Simple and easy to use and adapt . Have Fun ! Installation / Usage: For usage instructions and information of how to use the GF Breath Script please refer to the included documentation and/or example mission. Place in your mission the files . There is everything included , in the initServer.sqf , to copy paste in your mission . https://community.bistudio.com/wiki/SQF_syntax Don't try to open this with the simple notepad. For everything that is with comment // in front or between /* means that it is disabled , so there is no need to delete the extra lines. You can open this ex: with notepad++ https://notepad-plus-plus.org/ and also use the extra pluggins (this way will be better , it will give also some certain colors to be able to detect ex. problems ) http://www.armaholic.com/page.php?id=8680 or use any other program for editing . For the Compilation List of my GF Scripts , you can search in: https://forums.bohemia.net/forums/topic/215850-compilation-list-of-my-gf-scripts/ Notes: Breath particle , for Cold weather conditions. The particles will spawn according the fatigue. Credits and Thanks to : Thanks to All script contributors Thanks to everyone who tries to do the best for this game! Thanks to BIS for such a great platform . Thanks to BIS Community and BIS Community Forums . Thanks to Armaholic Community and Forums . Changelog: v2.0 Fixed , the cycle of breathing particle , depending on fatique. Added an exclude headgear list. v1.1 Fixed , the particle was spawned ,on dead units v1.0 Forum topic: - Armaholic forums http://www.armaholic.com/forums.php?m=posts&q=40267&n=last#bottom Armaholic GF Breath Script
  4. GF Ambient Environment Winter Script- Mod by GEORGE FLOROS [GR] Description: GF Ambient Environment Winter Script , create your desired Environment. You are free to do anything but i would like to give me Credits for this! Simple and easy to use and adapt . Have Fun ! Installation / Usage: For usage instructions and information of how to use the GF Ambient Environment Winter Script please refer to the included documentation and/or example mission. Place in your mission the files . There is everything included , in the initServer.sqf , initPlayerlocal.sqf and the Description.ext , to copy paste in your mission . https://community.bistudio.com/wiki/SQF_syntax Don't try to open this with the simple notepad. For everything that is with comment // in front or between /* means that it is disabled , so there is no need to delete the extra lines. You can open this ex: with notepad++ https://notepad-plus-plus.org/ and also use the extra pluggins (this way will be better , it will give also some certain colors to be able to detect ex. problems ) http://www.armaholic.com/page.php?id=8680 or use any other program for editing . For the Compilation List of my GF Scripts , you can search in: https://forums.bohemia.net/forums/topic/215850-compilation-list-of-my-gf-scripts/ Notes: Create your desired , Ambient Environment. This is a compilation of scripts and it is also including , the GF Ambient Environment Winter Script. The included Scripts are : GF Breath Script GF ColorCorrections Script GF Fog Script GF Weather Script GF Ambient Environment Winter Script The GF Ambient Environment Winter Script includes , a snow script and ambient sounds, for animals , birds for day and night , man sounds , forest SFX , wind blowing sfx and weather sound according to forecast. The available options can be edited in GF_AEW_init.sqf It is also included a mod version , posible to unpack and edit. Credits and Thanks to : Thanks to All script contributors Thanks to everyone who tries to do the best for this game! Thanks to BIS for such a great platform . Thanks to BIS Community and BIS Community Forums . Thanks to Armaholic Community and Forums . Changelog: v1.2 GF_Breath Script Updated. v1.1 GF_Breath Script Updated. GF_Fog Script Updated. v1.0 Forum topic: - Armaholic forums http://www.armaholic.com/forums.php?m=posts&q=40268&n=last#bottom Armaholic GF Ambient Environment Winter Script- Mod
  5. I've been using this script for some time by JohnO that I stumbled across in some forums and I made it a point to make his script even better! This is a good script to use to make any survival scenario better! As In my case I use this script with my Ravage releases. The Script: Changelog/ edit notes: v1.5 JohnO- Removed legacy fatigue settings and put new stamina settings in v2.0 MuRaZorWitchKING - added colorization of effects to make them more "appealing" v2.5 MuRaZorWitchKING - made script compatible with Ravage fireplaces that the player can place on ground v3.0 MuRaZorWitchKING - tweaked distances required to be from fireplaces/buildings for warmth v4.0 MuRaZorWitchKING - added in land vehicles being another form of covering for players to use for warmth so buildings and fires aren't relied upon Readme: In Order to use the script you need to have an init.sqf file that needs this script loaded into it in order for it to be used. In order for the script to work properly you ARE going to need the classnames of the list of clothing you are wanting to use for the player to get cold in. READ THIS: The classnames that you add into the script ARE THE COLD CLOTHING, everything listed will be a cold outfit, everything NOT listed will NOT be a cold outfit. THESE CLASSNAMES NEED TO BE FILLED OUT BY YOU: ////////////////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ //Civilian "", //Soldier "", //Guarilla "", ////////////////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ Once you figure out the classname of the outfit for example "U_C_Journalist" then you will place the name inside the "" and you will separate each item with a comma as seen in the example. If you want a FULL release of the script (filled out with all the classnames) I will be happy to help, this is more of a very simple layout, and should be taken as such, this script is for YOU to customize to your scenario/map wants and needs. ///////VERY IMPORTANT PLEASE READ: Please take note this is NOT my script, this is just someone else's work that I have revamped for a re-release. If the original author of the script no longer wants this up, this post WILL be removed. I hope you all enjoy this, JohnO did an amazing job on the script and is the original Author of it, I just thought it deserved a little more tweaking and a re-release. :) PLEASE REMEMBER TO GIVE CREDITS TO ORIGINAL AUTHOR: JohnO Link to Author's Original release: https://www.exilemod.com/topic/7717-detrimental-weather-effects-script/ ////////////////////////////////////////////////////////////////////////////////////////////////// Update for Frigid water Settings The Script: Simply add this script into your init.sqf in order to use it :) //PLEASE READ: YOU ARE FREE TO EDIT THIS SCRIPT, CHANGE IT WHICH WAY YOU WANT, BUT I WOULD LIKE CREDITS PLEASE. @GEORGE FLOROS GR Also helped me correct my errors after typing this script, couldn't of done it without this guy! ////NOTES: Both of these scripts are compatible with one another and work greatly paired together. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Hypothermia Script / Severe Weather based off of JohnO's weather effects script: Simply put the script in your init.sqf for it to be initialized. Please Read: This script is based off the Detrimental weather effects script by JohnO, so similarities will exist, as I used Detrimental Weather effects as a template for this script. this script uses wetness as a buildable value that can build up to a deadly level and can leave you with Hypothermia... You will need shelter, fire, and of course you will need to stay out of rough weather... This script is only active is severe weather storms, if the weather isn't above a factor of 0.6 then this script will not be called... This script is for a severe weather system only, unless edited. All three scripts seem to work together, I cannot say this is for sure or certain, but in the playtime I have been using them I have seen them work... In order to get all three to work together you must edit out all the "_rainLevel" lines in the weather effects script... So both scripts aren't searching for "rain". ALL FOUR SCRIPTS COMBINED MAKE FOR AN EXTREMELY REACTIVE WORLD THAT IS TOUGH TO SURVIVE IN. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Simple "Cold Altitude" script:
  6. GEORGE FLOROS GR

    GF Weather Script

    GF Weather Script by GEORGE FLOROS [GR] Description: GF Weather Script , simple and configurable to set your desired values. You are free to do anything but i would like to give me Credits for this! Simple and easy to use and adapt . Have Fun ! Installation / Usage: For usage instructions and information of how to use the GF Weather Script please refer to the included documentation and/or example mission. Place in your mission the files . There is everything included , in the initServer.sqf , to copy paste in your mission . https://community.bistudio.com/wiki/SQF_syntax Don't try to open this with the simple notepad. For everything that is with comment // in front or between /* means that it is disabled , so there is no need to delete the extra lines. You can open this ex: with notepad++ https://notepad-plus-plus.org/ and also use the extra pluggins (this way will be better , it will give also some certain colours to be able to detect ex. problems ) http://www.armaholic.com/page.php?id=8680 or use any other program for editing . For the Compilation List of my GF Scripts , you can search in: https://forums.bohemia.net/forums/topic/215850-compilation-list-of-my-gf-scripts/ Notes: Simple and configurable to set your desired values. Credits and Thanks to : Thanks to All script contributors Thanks to everyone who tries to do the best for this game! Thanks to BIS for such a great platform . Thanks to BIS Community and BIS Community Forums . Thanks to Armaholic Community and Forums . Changelog: v1.0 Forum topic: - Armaholic forums http://www.armaholic.com/forums.php?m=posts&q=40261 Armaholic GF Weather Script
  7. Sil's Simple Random Weather Script "A very simple approach to generating random weather patterns in Arma 3." by Sil Carmikas Version: 1.0 Final setRandomWeather.sqf Description: This is a bit of a mashup using manage_weather.sqf files from the original Liberation 0.924 mission from [GREUH]zBug and [GREUH]McKeewa. The below code will execute within the mission to add random weather pattern generation making use of the newer selectRandom command (Arma 3 Version: 1.56) This does not offer parameter selection for servers, the only customization that can be done is within the SQF file. This is a very basic script I am working with to learn scripting for Arma 3. Anyone is welcome to use this as they see fit. Instructions: Instructions: 1) Place anywhere you see fit, preferably in the root directory of your mission. 2) In your init.sqf, make sure to type in the following: [] spawn compileFinal proprocessFileLineNumbers "setRandomWeather.sqf"; 3) Save your init.sqf, load Arma 3, load the mission and test using setTimeMultiplier. You can decrease the "sleep 900;" command to observe the random changes more frequently for debugging and testing. Download: https://www.mediafire.com/?8mapw7zpwiwspc5 Here is the code below: if (!isServer) exitWith {}; _setRandom = [0,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95,1.0]; // Initial Weather skipTime -24; 0 setOvercast selectRandom _setRandom; // Initial Weather Set Values: 0 = Sunny, clear skies 1 = Stormy, complete overcast skipTime 24; sleep 0.1; // Keep this at or above 0.1, or else simulWeatherSync command will not work properly. simulWeatherSync; // This command will sync the selected weather pattern to appear as it should right away instead of having to wait. // Random Weather while { true } do { 300 setOvercast selectRandom _setRandom; // selectRandom is the new engine solution to BIS_fnc_selectRandom. This will select a random weather pattern from the array in variable _setRandom. Values: 0 = Sunny, clear skies 1 = Stormy, complete overcast. sleep 0.1; }; sleep 900; // Rests for 15 minutes real-life time before selecting new weather pattern. For 24 hour day cycles (1 in-game second = 1 real life second) or whichever you prefer, you will want to update this to make sure weather shifts as appropriate. Changelog: v. 1.0 Final: -Made a variable for the values for the Initial Weather and Random Weather sections = _setRandom -Made both setRain and setFog options available now. Refer to the setRandomWeather.sqf file for instructions on how to add for FPS control. v. 0.3 Beta: -Made setRain entries optional. The script will now automatically select the appropriate rain amounts without any restriction. If you want the restriction still for FPS purposes, then use the "If Then" statements provided in the script comments within the SQF file itself. -Added more options to the setOvercast arrays. This gives an increased range of options for selectRandom to be able to use. v. 0.2 Beta: -Removed setFog entry from Initial Weather section -Changed setFog settings in Random Weather to the following ----> 0 setFog [0, 0, 0]. This update ensures that the fog level is zeroed out, it's intent being to help with FPS issues. -Added selectRandom command to Initial Weather settings to make a more randomized starting weather pattern. Please feel free to do with it as you wish and how you see fit. Tweak it, mod it, break it, anything. I am open to constructive feedback. If there is a better way to do this, please share. I'd like to get as much info available out there for others learning to script as well too for this same type of thing.
  8. Hello :) I used to have syntax that was placed in the players init that would place fog around the player with like a greenish tinge to it and wind and such, it would also be nice if the effect didn't clear up either. Cheers and thanx for any help.. Edit: I do know about 0 setFog [0.5,0.05,200]; by the way, it is not exactly what I'm looking for tho,, or I just don't understand it enough..
  9. So I've been trying to follow the various threads on this topic, but I'm not the greatest at figuring out just where I messed up in my script. I am trying to have my players be able to set the mission time / weather parameters before beginning. Could someone take a look and tell me how to repair it? I get weather parameter working, but the time one won't kick in. Then I can get time working, but weather won't kick in. This is the description.ext class Params { class initialWeatherParam { title = "Starting Weather"; values[] = {0,1,2,3,4}; texts[] = {"Clear","Overcast","Rain","Fog","Random"}; default = 4; }; class TimeOfDay { title = "Time of Day"; values[] = {-6, 0, 8, 13}; texts[] = {"Morning", "Clear day", "Sundown", "Night"}; default = 0; }; }; Here is my init. I think this is where I am lost? weather = paramsarray select 0; timeofday = paramsarray select 1; execVM "briefing.sqf"; execVM "randomWeather2.sqf"; I'm using the RandomWeather2.sqf script from here - http://www.armaholic.com/page.php?id=24614 Any help would be appreciated.
  10. Designed to be lightweight only generating 1 - 2 threads at a time. I will improve on it at a later date. http://www.armaholic.com/page.php?id=30520 Additional things that will be coming in the future: Improve weather generation cycle to have more gradient change current sinewave generator "works" will need fine tuning Segmentation of client and server code better Improve performance (again) move to completely server-side execution mainly add back in lightning / thunder generating system (currently broken) Change Log: Version 0.11a (PENDING) [uPDATED] Debugging functions [uPDATED] Gradient Curve change improvements [ADDED] _locally defined initial parameters now .hpp file [ADDED] _executionPrecheck functions to confirm a file has indeed run and is completed [ADDED] Macros for debugging functions. [ADDED] debugging function also script limiter. Makes sure all code is initialized before completely executing each script. [ADDED] Documentation of each function. [CHANGED] Beaufort Model system reduced in size 14 lines now replaced all switch cases.
  11. Just Run this on the server only. already Synced to MP and JIP Set All the weather settings to manual and full in the mission editor for your mission Call It Weather.sqf - or what ever you want if (isServer) then {_nil = [] execVM "Weather.sqf"}; // Script by Zonekiller -- http://www.zonekiller.net -- -- zonekiller@live.com.au -- //Set All the weather settings to manual and full in the mission editor of your mission sleep 1; // ARRAY SETTINGS [fog,gusts,(wind dir),(wind force),overcast,rain] // Weather Types _clear = [(Random 1),0,0,0,0,0]; _clearwindy = [(Random 1),(.5 + (Random .5)),(Random 360),(.5 + (Random .5)),0,0]; _windy = [(Random 1),(.5 + (Random .5)),(Random 360),(.5 + (Random .5)),(.1 + (Random .9)),0]; _stillrain = [(Random 1),0,0,0,(.45 + (Random .55)),(.1 + (Random .9))]; _storm = [(Random 1),(.5 + (Random .5)),(Random 360),(.5 + (Random .5)),(.5 + (Random .5)),(.5 + (Random .5))]; _weatherpattern = [_clear,_clearwindy,_windy,_stillrain,_storm]; _weather = (_weatherpattern select (floor(random (count _weatherpattern)))); _fog = (_weather select 0); _gust = (_weather select 1); _dir = (_weather select 2); _force = (_weather select 3); _oc = (_weather select 4); _rain = (_weather select 5); // only foggy in the mornings if ((daytime > 4) && (daytime < 10)) then { 0 setFog _fog; }else{0 setFog 0}; 0 setGusts _gust; 0 setWindDir _dir; 0 setWindForce _force; 0 setOvercast _oc; 0 setRain _rain; _foggy = 0; sleep 120; while {true} do { _weather = (_weatherpattern select (floor(random (count _weatherpattern)))); _fog = (_weather select 0); _gust = (_weather select 1); _dir = (_weather select 2); _force = (_weather select 3); _oc = (_weather select 4); _rain = (_weather select 5); if ((daytime > 4) && (daytime < 10)) then { (200 + (Random 1000)) setFog _fog; _foggy = 0; }else{ if (_foggy == 0) then {_foggy = 1;(120 + (Random 1680)) setFog 0}; }; (120 + (Random 1680)) setGusts _gust; (120 + (Random 1680)) setWindDir _dir; (120 + (Random 1680)) setWindForce _force; (120 + (Random 1680)) setOvercast _oc; (120 + (Random 1680)) setRain _rain; sleep 1800; };
  12. 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
×