moonPhase: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Command " to "{{RV|type=command ")
m (Text replacement - "{{GameCategory|arma3|New Scripting Commands}} {{GameCategory|arma3|Scripting Commands}} {{uc:{{PAGENAME}}}}" to "")
Line 48: Line 48:
| [[moonIntensity]], [[sunOrMoon]]
| [[moonIntensity]], [[sunOrMoon]]
}}
}}
{{GameCategory|arma3|New Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Revision as of 15:39, 15 February 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Environment

Syntax

Syntax:
Syntax needed
Parameters:
date: Array - required date in date format
Return Value:
Return value needed

Examples

Example 1:
_currentMoonPhase = moonPhase date;
Example 2:
// Returns array of dates for given year when moon is at its fullest fnc_fullMoonDates = { private _year = param [0, 2035]; private ["_date", "_phase", "_fullMoonDate"]; private _fullMoonPhase = 1; private _waxing = false; private _fullMoonDates = []; for "_i" from dateToNumber [_year, 1, 1, 0, 0] to dateToNumber [_year, 12, 31, 23, 59] step 1 / 365 do { _date = numberToDate [_year, _i]; _phase = moonPhase _date; call { if (_phase > _fullMoonPhase) exitWith { _waxing = true; _fullMoonDate = _date; }; if (_waxing) exitWith { _waxing = false; _fullMoonDates pushBack _fullMoonDate; }; }; _fullMoonPhase = _phase; }; _fullMoonDates }; //set random full moon date in year 1970 setDate selectRandom (1970 call fnc_fullMoonDates);

Additional Information

See also:
See also needed

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note