Creating Dynamic TOD

Discuss thug2 modding, post your own, share your ideas, ask questions.
Anteara
Posts: 268
Joined: Thu Oct 14, 2010 2:55 am
Contact:

Creating Dynamic TOD

Postby Anteara » Sat Nov 27, 2010 6:42 pm

Hi All, I've started thinking of a new addition I can make for my mod, and I've come up with something, what I would like to know is... if it is possible. To me, it certainly seems possible. Before I start explaining, I'd just like to state that I'm not asking for help, I just want to know if its possible because if it isn't i wont have wasted my time.

As the original dynamic time of day menu is locked online, there is no way (currently) to change the time of day from morning-night online automatically.

I've got a working (yet unauthentic) morning, day, evening and night menu working online, and I was thinking I could set it to change the function every 10 minutes or so, via the clock.

Edit: For example I made a simple cycle like;

Code: Select all

:i function $test_func$
:i $exit_pause_menu$
:i call $morning_shadows$
       :i $wait$%f(5.000000)$seconds$
:i call $day_shadows$
       :i $wait$%f(5.000000)$seconds$
:i call $evening_shadows$
       :i $wait$%f(5.000000)$seconds$
:i call $night_shadows$
       :i $wait$%f(5.000000)$seconds$
:i $test_func$
:i endfunction


I put these in 5 second intervals so I could fraps it. When the time of day changes, it's very.. uh.. "solid". I mean that it changes from morning to day INSTANTLY, and it doesn't "Phase in". I've never come across anything like this, so I'm skeptical about its existence.. but is there a function that will allow another to be "phased in"? For example, morning disappears as day appears.

Thanks.

Also, I've not figured out what two variables do/mean.

I've come to the conclusion that $sun_phi$ probably means the coordinates of the sun, as it ascends like -10, 20, 180, 200, in the same order as morning to night.

But I'm unsure as to what $sun_theta$ means.

Return to “THUG2 modding”

Who is online

Users browsing this forum: No registered users and 139 guests