Home   Help Search Login Register  

Author Topic: Realistic timeflow script with daily AI events  (Read 1640 times)

0 Members and 1 Guest are viewing this topic.

kevinfostereditguy

  • Guest
Realistic timeflow script with daily AI events
« on: 11 Dec 2002, 12:07:58 »
An extremley easy script to use that you can use to make time flow faster from dayto night and vice versa and plan ai routes with.
sorry its not in a document, im in collage at the mo, i had to take it from my site at www.angelfire.com/apes/modmapperguy . make a "init.sqs" text document and place the first section what is below, then make anothertext document called "timeflow.sqs" what should contain all of what is below the "init.sqs" section.





;this first part should be called "init.sqs"

; this script makes the game time pass one hour in about 40 seconds
; like the acctime command, but only affects the visuals, not the units
; Just name this file "init.sqs" and place it in your missions folder
; where your mission resides


worldtime = 5
[] exec "timeflow.sqs"


; the worldtime is what the time is set as on your mission breifing
; (top right corner of mission editor), but can be changed according
; to when your mission starts, such as 7 for 7 am, 14 for 2 pm, etc.


;This part should be "timeflow.sqs"


#loop

~0.03125

skiptime 0.001953125

worldtime = worldtime + 0.001953125

? (worldtime) == 6 : titletext ["GOOD MORNIN' WORLD!", "plain"]

? (worldtime) == 11 : titletext ["Time for lunch", "plain"]

? (worldtime) == 17 : titletext ["I'ts getting dark", "plain"]

? (worldtime) == 23: titletext ["I'd better get some sleep", "plain"]

? (worldtime) == 24 : worldtime = worldtime - 24

goto "loop"

;these are  checks of each time of the day and what actions can be taken at that time of day, such as 5pm the player will see "its getting dark" text what can be changed to ANY action you like, such as a group moving to certinan point at that time, or any other action you can think of







anyway, tell me what you think and be shure to check out my site at www.angelfire.com/apes/modmapperguy for more scripts.