This extension let you synchronize the weather in Arma with the realworld weather. Default the extension will retrieve the current weather at the island "Stratis", or "Altis".
Extract the AWS-folder intoArma2Net/Addins/
and include @Arma2NET
as a mod.
To retieve the current weather information from (default) Stratis, you use this code:
_CurrentWeatherInformation = "Arma2Net.Unmanaged" callExtension "AWS YourAPIKey,Stratis/Altis";
You can get your own API-key by registrating on this site https://developer.forecast.io/
Since the extension will return it as a string, you have to compile it first.
_CurrentWeatherInformation = call compile _CurrentWeatherInformation;
_CurrentWeatherInformation
is a array containing multiple values:
["4.96", "105", "partly-cloudy-day", [2014, 1, 14, 16, 45], "0", "0.0381", "9.88", "0.32"]
In the order -> Windspeed
,windbearing
,Condition
, array containing the current date in the format [Year
,Month
,Date
,Hour
,Minute
], Visibility
,precipIntensity
,Temperature
,cloudCover
Read here(under "si") for more information about what unit each value is in.
Condition will have any of the following values:clear-day
, clear-night
, rain
, snow
, sleet
, wind
, fog
, cloudy
, partly-cloudy-day
, partly-cloudy-night
So, to retieve what condition the current weather is, you execute:
_weatherCondition = _CurrentWeatherInformation select 2;
If you wish to set synchronize the date, you execute:
_date = _CurrentWeatherInformation select 3; setDate _date;