Home   Help Search Login Register  

Author Topic: Day Cycle  (Read 594 times)

0 Members and 1 Guest are viewing this topic.

Jim666

  • Guest
Day Cycle
« on: 14 Mar 2004, 18:19:57 »
im a noob at scripting, and iv been looking for a day cycle one, where first off say its morning then goes through to night, then repeats etc.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Day Cycle
« Reply #1 on: 14 Mar 2004, 19:56:28 »
Can you be more specific?  You don't need a script to go day-night-day, the game will do that by itself ...
Plenty of reviewed ArmA missions for you to play

Jim666

  • Guest
Re:Day Cycle
« Reply #2 on: 14 Mar 2004, 21:11:18 »
so erm, the time goes quicker then normal, so like 1 hour in game is 10 minutes. something like that

Rappy

  • Guest
Re:Day Cycle
« Reply #3 on: 14 Mar 2004, 21:36:08 »
Something like this then ?

#timeloop
~0.046875
skiptime 0.0001953125
worldtime = worldtime + 0.0001953125
goto "timeloop"


In this case the time progresses quite slowly though, for every 0.046875 seconds it adds 0.0001953125 to the clock.
If you want it to be faster you can add more.

For example for 10 minutes to be an hour it would be like:
#timeloop
~0.05
skiptime 0.0083333333333
worldtime = worldtime + 0.0083333333333
goto "timeloop"


Jim666

  • Guest
Re:Day Cycle
« Reply #4 on: 14 Mar 2004, 22:17:39 »
can you put that into a more simple form?.. like what would i call the .sqs file and how i can activate it on a trigger?.. or something..

evil

  • Guest
Re:Day Cycle
« Reply #5 on: 16 Mar 2004, 22:09:02 »
Download this script and put it your mission folder.  Then go into the editor.  Go to any unit with a blank "init" line.  Put this in the init line:
Code: [Select]
[x] exec "time.sqs"
Where x is any number.  The higher x is, the faster time will go.  The lower, the slower.  Keep in mind you can use decimals.
« Last Edit: 16 Mar 2004, 22:10:22 by evil »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Day Cycle
« Reply #6 on: 16 Mar 2004, 22:15:39 »
Jim666, evil's advice is excellent.   I strongly recommed you also head over to the Editors Depot and read snYpir's Friendly Intro to Code Snippets and also Johan Gustafsson's Scripting Guide.   They will give you a very gentle and easy introduction to scripting which will enable to make good use of this and other scripts.
Plenty of reviewed ArmA missions for you to play

Jim666

  • Guest
Re:Day Cycle
« Reply #7 on: 17 Mar 2004, 17:01:23 »
Yeah, cheers it worked :)