Home   Help Search Login Register  

Author Topic: Prolonged Twilight  (Read 1703 times)

0 Members and 1 Guest are viewing this topic.

Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Prolonged Twilight
« on: 07 Feb 2007, 00:54:59 »
Ok I want to write a script that will prolong the twilight a little bit, maybe 10-15 minutes.

I was going to use the skiptime command and perhaps have a loop with a condition.
There'd be another script with a timer that would be for the condition in the first script.

Get me?

I have two issues. First, if I want to skip the time back a minute every minute for 15 minutes what would the skiptime value be?
Second, is there a way to write such a script tidily?

Code: [Select]
#Loop

? EndScript : GoTo "Exit"
~60
skiptime -whatevervalue
GoTo "Loop"

#Exit
Exit

Second script runs thus,

Code: [Select]
~900
EndScript = true
Exit
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Prolonged Twilight
« Reply #1 on: 07 Feb 2007, 09:15:33 »
whatevervalue = (24 - 1/60) to go to the previous minute of the next day.

You may try -1/60, but as far as I remember skiptime didnt work with negative values.

BTW, skipping a full minute would have weird visual effects every minute. You may try something smoother, each second jump one second backward in the next day 24 - 1/3600.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Prolonged Twilight
« Reply #2 on: 07 Feb 2007, 11:16:46 »
also, you don't need a second timer script.

Code: [Select]
_limit = _time
#Loop

~1
skiptime - (1/900)

?(_time >= (_limit + 900)):exit
goto "Loop"


Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re: Prolonged Twilight
« Reply #3 on: 07 Feb 2007, 12:41:11 »
I'm a little slow this morning.

How can I use fractions?
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Prolonged Twilight
« Reply #4 on: 07 Feb 2007, 13:33:27 »
Look at it as 1 divided by 900.


Planck
I know a little about a lot, and a lot about a little.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Prolonged Twilight
« Reply #5 on: 07 Feb 2007, 13:45:53 »
skipTime accepts only hours, so you need to use fractions of hour to achieve second or minute "granularity".
skipTime 1 = 1 hour forward
skipTime 1/60 = 1 minute forward
skipTime 1/3600 = 1 second forward

As far as I remember skipTime does not accept negative values (you should try this anyway), so once a second is elapsed, the more "similar" second to the elapsed one is just 24 hours less a second ahead. That is, the very same previous second of the next day.