• Welcome to Freedom Reborn Archive.
 

ffx day and night

Started by bearded, December 31, 2007, 04:43:34 PM

Previous topic - Next topic

bearded

is this the proper code?
FFX_Sun(50,50,0.5,0.9,(0.5,0.8,1))
if so, which of those numbers is the light factor?  i'm wanting to have a script that progresses the day during the mission.  brighter and brighter, then darker, and so on.

Conduit

My stutter package includes a function named Mission_Sunlight_Shift that gradually changes the sunlight values over a set period of time.  You can use that to make it gradually get brighter, then use regTimer to trigger a function that makes it gradually darker, and so on.

bearded

wonderfull!
now i just have to work my head around it.
would this let nocturnal attribute work properly when it is dark?  or is nocturnale more of a check when the mission begins only?

Conduit

From looking at FFX, it appears that Nocturnal does update itself every second, so it should still work.  As does Solar Powered.

HumanTon

To answer the question about what the numbers mean, the four values are:

1) rotation:   Sun rotation angle from north in degrees: +ve is east (-45)
2) tilt:      Sun tilt from horizontal in degrees: +ve is down (45)
3) brightness:   Intensity of sunlight (0=none to 1=full)
4) ambient:   Intensity of ambient light (0=none to 1=full)
5) color:      3-Tuple,  red, green, blue values (all are 0 to 1)

The light factors are 3) and 4). Item 3) controls the intensity of the directional light from the sun, while 4) controls the ambient "light from nowhere." So to set up a dark cave you'd set 3) to zero, but then set 4) to some value high enough to let you see what the heck is going on.