{"name":"sunOrMoon","title":"sunOrMoon","type":"command","url":"https://community.bistudio.com/wiki/sunOrMoon","revid":363669,"updated":"2024-04-14T20:21:37Z","groups":["Environment"],"status":"ok","games":{"arma2oa":"1.62","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.62","arma3_since":"0.50","description":"| Time | sunOrMoon |\n|---|---|\n| 12:00 | 1 |\n| (...) | 1 |\n| 18:39 | 0.911201 |\n| 18:42 | 0.576303 |\n| 18:45 | 0.240862 |\n| 18:48 | 0 |\n| (...) | 0 |\n| 06:00 | 0.695308 |\n| 06:03 | 0.739519 |\n| 06:09 | 1 |\n| (...) | 1 |\n\nReturns the moon to sun transition state in range 0..1.\nThe return value is either 0 or 1 most of the time, the in-between values only returned during a few minutes in the morning and in the evening, depending on the date, and could be similar to shown here:","syntaxes":[{"syntax":"sunOrMoon","params":[],"returns":{"type":"Number","type_expr":"Number","description":"0 for night (moon), 1 for day (sun)"},"form":"nullary"}],"examples":[{"code":["private _transitionState = sunOrMoon;"]}],"see_also":["moonIntensity","moonPhase"]}