{"name":"sunOrMoon","operator":null,"title":"sunOrMoon","type":"command","url":"https://community.bistudio.com/wiki/sunOrMoon","revid":363669,"updated":"2024-04-14T20:21:37Z","groups":["Environment"],"status":"ok","replaced_by":[],"games":[{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.62"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.62"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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.\n\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","since":null,"effect":null,"exec":null,"params":[],"returns":{"type":"Number","types":["Number"],"description":"0 for night (moon), 1 for day (sun)","text":"Number - 0 for night (moon), 1 for day (sun)"},"form":"nullary","operator":null,"left":null,"right":null}],"examples":[{"text":"```sqf\nprivate _transitionState = sunOrMoon;\n```","code":["private _transitionState = sunOrMoon;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["moonIntensity","moonPhase"],"notes":[],"categories":["Arma 2: Operation Arrowhead: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 3: Scripting Commands","Command Group: Environment","Introduced with Arma 2: Operation Arrowhead version 1.62","Scripting Commands","Take On Helicopters: Scripting Commands"]}