Home   Help Search Login Register  

Author Topic: Accelerating Time??  (Read 1323 times)

0 Members and 1 Guest are viewing this topic.

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Accelerating Time??
« on: 14 Sep 2005, 20:13:40 »
Hi, does anybody know how I can make the time go from night to day? I have an intro start at night time that targets west soldeirs, and then after the cutscene is over, i want to have a black out, then have the camera target the enemy soldiers, but it's going to be during the day, I want to also have it set at a specific time during the day, say like 9am in the morning. ANy help please, thank you.
Who's hyped for Arma4, long live Arma!

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Accelerating Time??
« Reply #1 on: 14 Sep 2005, 20:16:41 »
Use the command
skiptime

http://www.ofpec.com/editors/comref.php?letter=S#skipTime


To go to forward to 9:00am try:
Code: [Select]
_endtime = 9
_skip = (_endtime - daytime + 24) % 24
skiptime _skip
« Last Edit: 14 Sep 2005, 20:21:43 by THobson »

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re:Accelerating Time??
« Reply #2 on: 14 Sep 2005, 20:23:23 »
How do i do that, do I use it like this?

Code: [Select]
this skiptime 2.5

And then the 2.5 is how many hours ahead you want it to move too. THen how do you make it stop? Or does it automatically stop?
Who's hyped for Arma4, long live Arma!

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Accelerating Time??
« Reply #3 on: 14 Sep 2005, 20:24:23 »
Just read the comref and try the script I gave you.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Accelerating Time??
« Reply #4 on: 14 Sep 2005, 20:26:10 »
You don't nee the "this":  it's just

skiptime 2.5

The time change is instantaneous:  it affects time of day, sun, moon, stars and tide (I think).   It has no effect on units.  

Just experiment a bit till you see what it does.  ;)

THobson's code is useful if you want to go from an unknown time to a known time.  
Plenty of reviewed ArmA missions for you to play

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re:Accelerating Time??
« Reply #5 on: 14 Sep 2005, 20:26:22 »
Hi, not sure how to implement the script. Do i create a so called script "time.sqs" then put that code in. THen how do I execute such a script, should i do it with a trigger or can I do it in the cutscene sqs file?
Who's hyped for Arma4, long live Arma!

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Accelerating Time??
« Reply #6 on: 14 Sep 2005, 20:29:08 »
To use it in a trigger put this in the activation field of the trigger:


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

It will take you forward to 9:00am

Apologies for being a bit short - I had to rush off.
« Last Edit: 14 Sep 2005, 20:30:31 by THobson »

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re:Accelerating Time??
« Reply #7 on: 14 Sep 2005, 20:31:02 »
Awesome, it worked, so I can use that in a camera script sqs file too right? Just simply put that code how ever I want?
Who's hyped for Arma4, long live Arma!

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Accelerating Time??
« Reply #8 on: 14 Sep 2005, 20:33:14 »
Yes.
Plenty of reviewed ArmA missions for you to play

bored_onion

  • Guest
Re:Accelerating Time??
« Reply #9 on: 14 Sep 2005, 20:34:07 »
in a word: yes

EDIT: argh macbuga beats me to it by seconds
« Last Edit: 14 Sep 2005, 20:34:50 by bored_onion »

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re:Accelerating Time??
« Reply #10 on: 14 Sep 2005, 20:36:30 »
Awesome, now I can make a cool cutscene. Hey another questions. IF the command reference says this

Code: [Select]
skiptime 2.5
just an example. How are you sapose to know how to even type that almost complicated code you gave me above ??The command reference is good but I think it doesn't explain most of the things you need to know for the commands

Code: [Select]
skiptime ((9 - daytime + 24) % 24)
Who's hyped for Arma4, long live Arma!

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Accelerating Time??
« Reply #11 on: 14 Sep 2005, 20:45:26 »
I suggest you look up daytime and % in the comref.  Then you should be able to work out how it all works.  How do we know to do this?  Experimentation.

Now if you want something at looks really cool run a script with this in it:

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



#loop
skipTime _timeIncrements
~ _Pausetime
_counter = _counter - 1
? (_counter > 0): goto "loop"
Sorry if this is a bit messy.  It is from an old mission I wrote a while ago.
« Last Edit: 14 Sep 2005, 20:53:05 by THobson »

Kyle Sarnik

  • Guest
Re:Accelerating Time??
« Reply #12 on: 14 Sep 2005, 20:48:11 »
Awesome, now I can make a cool cutscene. Hey another questions. IF the command reference says this

Code: [Select]
skiptime 2.5
just an example. How are you sapose to know how to even type that almost complicated code you gave me above ??The command reference is good but I think it doesn't explain most of the things you need to know for the commands

Code: [Select]
skiptime ((9 - daytime + 24) % 24)

Hehe, its not a complicated line of code, just some basic math. Math is an important thing to be good at if you wish to become a good scripter, you will use a lot of it. Daytime is a command that returns the current time of day (in hours), and the rest will calculate how to get from the current time to the desired time (the difference in hours).

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re:Accelerating Time??
« Reply #13 on: 14 Sep 2005, 20:50:20 »
Thanks guys for all your fast replies, that fixed my problem.. I'm using a cutscene where i use 1985 voices and resistance voices as part of it.
Who's hyped for Arma4, long live Arma!