Feature #26941

new commands: sunrise, sunset

Added by ruebe over 5 years ago. Updated almost 4 years ago.

Status:Assigned Start date:12/08/2011
Priority:Normal Due date:
Assignee:Dwarden % Done:


Category:Scripting: New command
Target version:-
Affected ArmA II version: First affected ArmA II version:
Reproduced by another DH user:No Single / Multi Player?:
I am using some Mods:No BIForumURL:
I am using: NGUrl:
Reproducible for you:No WIKIurl:
Related to content of DLC:


How about two commands that return the time the sun rises/sets at the given date (on the current island/map), which would be most useful to customize/plan missions (choosing a start-time; suprise attack at dawn this time? Yeah!).
Besides the moonphase, this would be the last missing piece to offer a complete and reliable weather/forecast report. :)

Syntax: 1) sunrise <date>; 2) sunset <date>,
where <date> is an array as returned by the date-command or simply an array [year, month, day].

Returns: an array [hours, minutes, seconds] or even [hours, minutes, seconds]
or an empty array if the sun doesn't rise/set at the given date.

fn_sun.sqf - somewhat, a little bit correct... :/ (3.7 kB) ruebe, 12/08/2011 20:05

Related issues

related to ARMA2 Community Issue Tracker - Feature #32153: ArmA2 Moon phases should be in sync with real world Moon ... Assigned 05/29/2012


Updated by ruebe over 5 years ago

Attached fn_sun.sqf, which is an attempt to calculate this.
Though it doesn't seem to be "spot on". :/

Feel free to use this in the meantime. Any suggestions are welcome of course, though I really think the "engine" should give us an answer to these question, rather than coming up with functions that almost match, what the "engine" already does...

Updated by zGuba over 5 years ago

  • Status changed from New to Assigned
  • Assignee set to Dwarden
  • Affected ArmA II version deleted (Please select...)
  • Maxmem parameter deleted (Not set)
  • Difficulty deleted (Not set)
  • Language deleted (Please set for missions)
  • First affected ArmA II version deleted (Please select...)

Good idea. Something I was searching for recently with my nvg script.

Updated by kju about 5 years ago

  • Category changed from Scripting: Problem to Scripting: New command

Also available in: Atom PDF