Home   Help Search Login Register  

Author Topic: Day/Night/Twilights and winter detection  (Read 1658 times)

0 Members and 1 Guest are viewing this topic.

Offline SoldierEPilot

  • Members
  • *
Day/Night/Twilights and winter detection
« on: 08 Oct 2014, 17:20:44 »

 I found the way to detect  if it's a day, night or twilights with the accuracy about 10 seconds.

In several words, if man knows about barrel 20 m before him == 1.4 - it's night, 4.0 -day,
between these 2 values - twilights.

The main idea is illustrated by missionette "isNight.Eden".
A normally working example is "isNight3.Eden", where the script is also shows  if it's winter or not.
(Set time to 6:50. If no sunrise yet it's winter or last days of November or first days of March)
Implementation: weather effects. Rain in January and snow in July are not the effects I would like to see.

Just try to load the mission in different days of the year and set any time - all must work.

The more complex (and BTW not very important) problem is season detection.
 The problem is too difficult for one me, maybe community will find the answer.
"Season.Eden" is my not working attempt.
Some time ago it works for 11 months, but the params were not saved and I can't repair it anyhow. >:(

Offline Lone~Wolf

  • Mission Tools & Mods
  • Members
  • *
  • Vladimir Dmitri Mikhail Andreevich Stamenov
Re: Day/Night/Twilights and winter detection
« Reply #1 on: 10 Oct 2014, 19:22:20 »
Dude, I love you. You always post such awesome stuff, and even though these forums seem deserted, do know that me and maybe some other people do appreciate the things you make.

Keep up the awesome work!
Snarling creature, lurking in the background, still writing in .sqs

Offline Lenyoga

  • Professor of Misanthropology
  • Members
  • *
Re: Day/Night/Twilights and winter detection
« Reply #2 on: 12 Oct 2014, 15:01:18 »
Great thinking! I wish we had more pilots like you.
As a grandmother I've got lots of gold.

Offline Rellikki

  • Members
  • *
  • Die-hard OFP player
Re: Day/Night/Twilights and winter detection
« Reply #3 on: 19 Oct 2014, 09:37:48 »
Really smart! This will come in handy.