Home   Help Search Login Register  

Author Topic: Fast forward through the day  (Read 1272 times)

0 Members and 1 Guest are viewing this topic.

Offline Pr0ph3t

  • Members
  • *
Fast forward through the day
« on: 15 Mar 2005, 04:48:15 »
Okay first part is easy, (I don't remember how but I kinda remember it being easy).

You arrive at night hide in a location, trigger takes over and accelerates whatever time it is to 8:30 in the morning. How do I do this?

Second, jeep with driver detects its 8:30 and comes to pick you up?

Thanks a bunch ppl


Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re:Fast forward through the day
« Reply #1 on: 15 Mar 2005, 08:28:24 »
skipTime X makes the clock jump X number of hours. setAccTime Y makes the time go T times faster until you set it back to 1 again. Check these two commands out in the comref. There is also a daytime command (but I've forgotten it's name) that detects time of day within the game. Again, check the comref.
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Fast forward through the day
« Reply #2 on: 15 Mar 2005, 08:29:17 »
try something like

skiptime (8.5 - daytime)  for 8:30 am
skiptime (20.5 - daytime) for 8:30pm

Not guaranteed but you get the idea.

If you always want the next 8:30 (ie you don't want time to skip backwards if it is later than 8:30 then try

skiptime ((20.5 +24 - daytime) % 24)  

for 8:30 pm

Again, not guaranteed,  Play around with it a bit.

EDIT:  Well I thought I was going the be the first but it looks like I was beaten to it.
« Last Edit: 15 Mar 2005, 14:24:02 by THobson »

Offline RujiK

  • Members
  • *
  • KoKo Puh-Fizzles!
Re:Fast forward through the day
« Reply #3 on: 15 Mar 2005, 18:45:32 »
Um that might work but there are easier ways...
do you want time to actually speed up so you can see time moving faster than usual without having units move faster? If so this would work:

#loop
skiptime 0.02
~0.5
?(Daytime >= 8.5):Hint"Its 8:30 baby!";exit
goto"loop"

But sadly for this you'll need a fast system because skiptime is very CPU intense if you have alot of units around...
« Last Edit: 15 Mar 2005, 18:45:45 by RujiK »
I like your approach, lets see your departure.
Download the New Flashlight Script!

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Fast forward through the day
« Reply #4 on: 15 Mar 2005, 19:13:12 »
Quote
Um that might work but there are easier ways...
I think you will find that it does work (I was just being a bit modest), and what could be easier than that one line?

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re:Fast forward through the day
« Reply #5 on: 15 Mar 2005, 21:31:59 »
Quote
But sadly for this you'll need a fast system because skiptime is very CPU intense if you have alot of units around...


Setacctime is CPU intensive, but skiptime is not as it does not advance or speed the movement of units (only the time is affected by skiptime, not motion).

Offline Pr0ph3t

  • Members
  • *
Re:Fast forward through the day
« Reply #6 on: 16 Mar 2005, 00:43:41 »
Basically, this is what I need. You get there at night kill a civy, and sleep on his bed. Screen blacks out (sleeping) time accels from whatever time it is ( VERY IMPORTANT to consider this) up to 08:30am
where screen fades in and jeep is outside waiting for you.

So I dunno.. How will I make it FForward from X time up to 8:30 ?
« Last Edit: 16 Mar 2005, 00:44:02 by Pr0ph3t »

Offline Pr0ph3t

  • Members
  • *
Re:Fast forward through the day
« Reply #7 on: 16 Mar 2005, 00:59:51 »
Ok. I know what I need now, I just don't know how to program it:

The time you complete your first objective at is X

so 8:30am - X = dT

so skiptime dT get it?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Fast forward through the day
« Reply #8 on: 16 Mar 2005, 01:25:08 »
How about:

?daytime == 8.5 : exit
?daytime > 8.5 : skiptime ((24 - daytime) + 8.5)
?daytime < 8.5 : skiptime (8.5 - daytime)


At least I think that will work


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

Offline Pr0ph3t

  • Members
  • *
Re:Fast forward through the day
« Reply #9 on: 16 Mar 2005, 03:34:00 »
You're my favorite planck

So we'll call the script time.sqs

Trigger Activation: unitname exec "time.sqs"

time.sqs
?daytime == 8.5 : exit
?daytime > 8.5 : skiptime ((24 - daytime) + 8.5)
?daytime < 8.5 : skiptime (8.5 - daytime)

right? I'll give it a try soon
« Last Edit: 16 Mar 2005, 03:35:13 by Pr0ph3t »

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Fast forward through the day
« Reply #10 on: 16 Mar 2005, 08:18:51 »
I sometimes wonder why I bother.

skiptime ((8.5 +24 - daytime) % 24)  

can be used instead of:

?daytime > 8.5 : skiptime ((24 - daytime) + 8.5)
?daytime < 8.5 : skiptime (8.5 - daytime)


Just read reply #2

Bye the way the line

?daytime == 8.5 : exit

Is not needed

« Last Edit: 16 Mar 2005, 14:46:53 by THobson »

Offline Pr0ph3t

  • Members
  • *
Re:Fast forward through the day
« Reply #11 on: 16 Mar 2005, 23:56:40 »
I created a trigger and in the activation line I put:

skiptime ((8.5 +24 - daytime) % 24)  

This fastforwarded the day instantly to 8:30am.