Home   Help Search Login Register  

Author Topic: Speed up time  (Read 592 times)

0 Members and 1 Guest are viewing this topic.

Jim666

  • Guest
Speed up time
« on: 28 Dec 2004, 16:04:04 »
how do i make the time of day change quicker then actually waiting a whole 24 hours?

So it'll make it so it starts in day, then 10 minutes later its night?

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Speed up time
« Reply #1 on: 28 Dec 2004, 16:20:34 »
if you want to acually watch it change, use setacctime
something like:
setacctime 20
just a guess, mess with the number til you get the effect you want
there is also a command...skiptime
From the comref:
Quote
skipTime duration
Operand types:
    duration: Number
Type of returned value:
    Nothing
Description:
    Skip time. Daytime is adjusted, weather change is estimated, no changes in any units are done. Duration is in hours.

Example:
    skipTime 2.5

Offline C0LDSt33L

  • Members
  • *
  • Member of the SotM Team
Re:Speed up time
« Reply #2 on: 28 Dec 2004, 16:21:41 »
This can be done with setacctime for a smooth tranistion or skiptime for an instant one. Setacctime actually makes the game massivly faster so I can't really reccomend it.

I'd suggest skiptime 5 (or whatever) to change the time in your mission. If you wanted a gradual transfer you could write a script to skiptime 0.1 every second for 10 seconds or something like that. The number represents hours rather than minutes or seconds.

Offline C0LDSt33L

  • Members
  • *
  • Member of the SotM Team
Re:Speed up time
« Reply #3 on: 28 Dec 2004, 16:23:38 »
Trigger's right there. He must have posted his post while I was writing mine.  :P

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Speed up time
« Reply #4 on: 28 Dec 2004, 17:52:26 »
You can use skipTime in a fast loop to give a smooth transition without speeding up the game.  For an example see the Intro to this mission:

http://www.ofpec.com/missions_depot/index.php?ID=1061

It uses code like this:

Code: [Select]
_timeSlices = 200
_timeIncrements = ((_EndTime +24 - _startTime) % 24)/_timeSlices
_counter = _timeSlices
_ScanTime = 9
_Pausetime = _ScanTime/_timeSlices


#loop
skipTime _timeIncrements
~ _Pausetime
_counter = _counter - 1
? (_counter > 0): goto "loop"


Where:
_EndTime and  _startTime have obvious meanings and are specified earlier in the script

« Last Edit: 28 Dec 2004, 17:59:05 by THobson »

Lean Bear

  • Guest
Re:Speed up time
« Reply #5 on: 31 Dec 2004, 11:35:36 »
skipTime is the command to use here as:

Quote
no changes in any units are done.

Whereas with setAccTime it does exactly what it says. Accelerates time. So the units will be moving extremely fast as well.

As COLDST33L says, it is incredibly hard to control and the movement is jerky etc.