OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: SoldierEPilot on 08 Oct 2014, 17:20:44

Title: Day/Night/Twilights and winter detection
Post by: SoldierEPilot 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. >:(
Title: Re: Day/Night/Twilights and winter detection
Post by: Lone~Wolf 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!
Title: Re: Day/Night/Twilights and winter detection
Post by: Lenyoga on 12 Oct 2014, 15:01:18
Great thinking! I wish we had more pilots like you.
Title: Re: Day/Night/Twilights and winter detection
Post by: Rellikki on 19 Oct 2014, 09:37:48
Really smart! This will come in handy.