Jump to content

optimus290

Member
  • Content Count

    2
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About optimus290

  • Rank
    Newbie
  1. Hey.. after going through your script this is what I tried to do. I don't know why it doesn't work. Local exec for setFog, setOvercast works.. with the workaround of skiptime -24; (make weather changes); skipTime 24; simulWeatherSync; Also.. like you mentioned that setOvercast and setFog cannot be used together at the same time, are there any other dependencies or constraints of the same sort? For e.g. Like setRain works only if Overcast is 0.7 or above. I am asking because I tried using setRainbow, setLightnings, setWaves assuming that setRainbow and setWaves would require rain and hence overcast... I am calling the sqf file in init.sqf like this..... [4, 'fog'] execVM "dynamicWeather.sqf"; private ["_initialWeatherPreset, _weatherOvercastOrFog"]; //_weatherOvercastOrFog - since only one of the two commands setOvercast and setFog work at a given time private ["_initialFog, _initialOvercast, _initialRain", "_initialWindE", "_initialWindN", "_initialWindDir","_initialWindForce", "_initialWindStr", "_initialGusts", "_initialRainbow", "_initialLightnings", "_initialWaves"]; _initialWeatherPreset = _this select 0; _weatherOvercastOrFog = _this select 1; dw_dynamicWeatherEventArgs = []; //Values will be passed through this array to set weather dw_askServerWeatherChangeEventArgs = []; //Used to query server for weather changes dw_serverInitialized = false; //Used by server to notify clients of its initialization dw_fnc_SetWeatherLocal = { private ["_currentFog, _currentOvercast, _currentRain", "_currentWindE", "_currentWindN", "_currentWindDir","_currentWindForce", "_currentWindStr", "_currentGusts", "_currentRainbow", "_currentLightnings", "_currentWaves", "_currentWeatherType"]; private ["_transitionTime"]; _transitionTime = 86400; // In secs _currentFog = _this select 0; _currentOvercast = _this select 1; _currentRain = _this select 2; _currentWindE = _this select 3; _currentWindN = _this select 4; _currentWindDir = _this select 5; _currentWindForce = _this select 6; _currentWindStr = _this select 7; _currentGusts = _this select 8; _currentRainbow = _this select 9; _currentLightnings = _this select 10; _currentWaves = _this select 11; _currentWeatherType = _this select 12; //set new weather skipTime -24; if (_currentWeatherType == 'overcast') then { _transitionTime setOvercast _currentOvercast; }; if (_currentWeatherType == 'fog') then { _transitionTime setFog _currentFog; }; _transitionTime setRain _currentRain; _transitionTime setWindDir _currentWindDir; _transitionTime setWindForce _currentWindForce; _transitionTime setWindStr _currentWindStr; _transitionTime setGusts _currentGusts; _transitionTime setRainbow _currentRainbow; _transitionTime setLightnings _currentLightnings; _transitionTime setWaves _currentWaves; skipTime 24; setWind [_currentWindE, _currentWindN, true]; //true for setting this as permanent wind vector. simulWeatherSync; //sync simul weather w/ arma weather }; //This method is only called by server to broadcast the updated weather values dw_fnc_SetWeatherGlobal = { private ["_currentFog, _currentOvercast, _currentRain", "_currentWindE", "_currentWindN", "_currentWindDir","_currentWindForce", "_currentWindStr", "_currentGusts", "_currentRainbow", "_currentLightnings", "_currentWaves", "_currentWeatherType"]; _currentFog = _this select 0; _currentOvercast = _this select 1; _currentRain = _this select 2; _currentWindE = _this select 3; _currentWindN = _this select 4; _currentWindDir = _this select 5; _currentWindForce = _this select 6; _currentWindStr = _this select 7; _currentGusts = _this select 8; _currentRainbow = _this select 9; _currentLightnings = _this select 10; _currentWaves = _this select 11; _currentWeatherType = _this select 12; dw_dynamicWeatherEventArgs = [_currentFog, _currentOvercast, _currentRain, _currentWindE, _currentWindN, _currentWindDir,_currentWindForce, _currentWindStr, _currentGusts, _currentRainbow, _currentLightnings, _currentWaves, _currentWeatherType]; publicVariable "dw_dynamicWeatherEventArgs"; //Broadcast weather to all clients dw_dynamicWeatherEventArgs call dw_fnc_SetWeatherLocal; //Set weather on server explicitly since broadcasting machine doesn't get broadcasted value }; //Client code if !(isServer) then { //Listen for broadcasted weather changes from server "dw_dynamicWeatherEventArgs" addPublicVariableEventHandler { dw_dynamicWeatherEventArgs call dw_fnc_SetWeatherLocal; }; //wait until server is ready //waitUntil { dw_serverInitialized == true;}; //query server for weather changes //dw_askServerWeatherChangeEventArgs = [true]; //publicVariable "dw_askServerWeatherChangeEventArgs"; }; //Server code if (isServer) then { //Depending on parameter passed select initial weather preset. switch (_initialWeatherPreset) do{ case 0 : {_initialFog = 0; _initialOvercast = 0; _initialRain = 0; _initialWindE = 1; _initialWindN = 1, _initialWindDir = 100; _initialWindForce = 0.25; _initalWindStr = 0.12; _initialGusts = 0; _initialRainbow = 0; _initialLightnings = 0; _initialWaves = 0;}; //Clear case 1 : {_initialFog = 0; _initialOvercast = 0.60; _initialRain = 0; _initialWindE = 2; _initialWindN = 2, _initialWindDir = 100; _initialWindForce = 0.45; _initalWindStr = 0.25; _initialGusts = 0.2; _initialRainbow = 0; _initialLightnings = 0; _initialWaves = 0.34;}; //Overcast case 2 : {_initialFog = 0.05; _initialOvercast = 0.71; _initialRain = 0.71; _initialWindE = 3; _initialWindN = 2; _initialWindDir = 155; _initalWindForce = 0.57; _initalWindStr = 0.46; _initialGusts = 0.43; _initialRaibow = 0.59; _initialLightnings = 0; _initialWaves = 0.56;}; //Light Rain w/ Rainbow case 3 : {_initialFog = 0.45; _initialOvercast = 0.86; _initialRain = 0.82; _initialWindE = 1.545; _initialWindN = -1.636; _initialWindDir = 225; _initialWindForce = 0.66; _initialWindStr = 0.60; _initialGusts = 0.64; _initialRainbow = 0; _initialLightnings = 0.25; _initialWaves = 0.66;}; //Heavy rain w/ moderate lightning case 4 : {_initialFog = 0.86; _initialOvercast = 0.90; _initialRain = 0.91; _initialWindE = 2.636; _initialWindN = -1.686; _initialWindDir = 290; _initialWindForce = 0.85; _initialWindStr = 0.79; _initialGusts = 0.78; _initialRainbow = 0; _initialLightnings = 0.73; _initialWaves = 0.77;}; //Heavy rain w/ heavy lightning w/ heavy fog case 5 : {_initialFog = random(1); _initialOvercast = random(1); _initialRain = random(1); _initialWindE = (random(14)-7); _initialWindN = random(14)-7); _initialWindDir = random(360.00); _initialWindForce = random(1); _initialWindStr = random(1); _initialGusts = random(1); _initialRainbow = random(1); _initialLightnings = random(1); _initialWaves = random(1);}; //Random }; dw_dynamicWeatherEventArgs = [_initialFog, _initialOvercast, _initialRain, _initialWindE, _initialWindN, _initialWindDir,_initialWindForce, _initialWindStr, _initialGusts, _initialRainbow, _initialLightnings, _initialWaves, _weatherOvercastOrFog]; publicVariable "dw_dynamicWeatherEventArgs"; dw_dynamicWeatherEventArgs call dw_fnc_SetWeatherLocal; //Notify all clients that the server is initialized. Now they can query for weather changes //dw_serverInitialized = true; //publicVariable "dw_serverInitialized"; //Send clients current weather upon receiving request /*"dw_askServerWeatherChangeEventArgs" addPublicVariableEventHandler { dw_dynamicWeatherEventArgs = [_initialFog, _initialOvercast, _initialRain, _initialWindE, _initialWindN, _initialWindDir,_initialWindForce, _initialWindStr, _initialGusts, _initialRainbow, _initialLightnings, _initialWaves, _weatherOvercastOrFog]; dw_dynamicWeatherEventArgs call dw_fnc_SetWeatherGlobal; };*/ //Keep changing weather every 15 mins While {TRUE} do { sleep 900; // 15 mins //Generate new weather randomly _initialFog = random(1); _initialOvercast = random(1); _initialRain = random(1); _initialWindE = (random(14)-7); _initialWindN = (random(14)-7); _initialWindDir = random(360.00); _initialWindForce = random(1); _initialWindStr = random(1); _initialGusts = random(1); _initialRainbow = random(1); _initialLightnings = random(1); _initialWaves = random(1); //Set newly generated weather dw_dynamicWeatherEventArgs = [_initialFog, _initialOvercast, _initialRain, _initialWindE, _initialWindN, _initialWindDir,_initialWindForce, _initialWindStr, _initialGusts, _initialRainbow, _initialLightnings, _initialWaves, _weatherOvercastOrFog]; publicVariable "dw_dynamicWeatherEventArgs"; dw_dynamicWeatherEventArgs call dw_fnc_SetWeatherLocal; }; };
  2. optimus290

    Class names

    Hi. I am new to these forums and Arma 3 modding in general. I am asking this question here since its its related to classnames in arma 3. I wish to know how do I add respawn point module using code in description.ext? I have created different loadouts using CfgRespawnInventory class in the description.ext file. Is there a class called CfgRespawnPosition that I can create? If yes, where do I find the parameters to put in it? For e.g. DisplayName, icon, Position etc. I was able to find all the configurations needed to customise loadout under Assets section of Arma 3 wiki but didn't see any cfgs for respawn modules. Thanks.
×