Home   Help Search Login Register  

Author Topic: x2 accelerated time  (Read 1021 times)

0 Members and 1 Guest are viewing this topic.

B-2-0

  • Guest
x2 accelerated time
« on: 21 Aug 2003, 18:03:25 »
I'm in the midst of making a MP co-op mission and i want to have time running at 2x whilst the gameplay runs at normal speed.  Does anyone have the scripting knowledge to make this possible?

I have heard that this causes big desync, is this true, or does it depend how well it is scripted?

Thx in advance :thumbsup:
« Last Edit: 21 Aug 2003, 18:05:09 by B-2-0 »

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:x2 accelerated time
« Reply #1 on: 21 Aug 2003, 19:24:19 »
i think you are talking about "Skiptime", this advances the daytime

On a map that runs for more than 30 minutes, like a cti using lots of vehicles etc, where desync is also a problem, then the server and clients are likely to get way out of sync with each other

For a 30 minute map, then it isnt such a problem

anyway, here are the scripts that are used in the EFL templates for a 24hr cycle game
They help to synch server and clients. Cant remember where we got them from or adopted them from, so apologies to initial code maker

They give extremely accelerated sunset and sunrise and run just over a day in 30 minutes.

Simply reduce the skiptime values in the Updateskiptimeserver.sqs to slow this effect down


Init.sqs entries are
Quote
?(local server):[] exec "UpdateSkipTimeServer.sqs";[] exec "UpdateClockServer.sqs"
?!(local Server):[] exec "UpdateClock.sqs"

and the scripts themselves

1)Updateclock.sqs
Quote
?(local Server):exit
newTime = false

#start
@(newTime)
_serverTime = currentServerTime
_timeChange = _serverTime - daytime
skipTime _timeChange
newTime = false
?(Time>=Param1):exit
goto "start"


2) Updateclockserver.sqs
Quote
?!(local Server):exit
newTime = false;PublicVariable "newTime"
~5

#start
~10
currentServerTime = daytime; PublicVariable "currentServerTime"
newTime = true; PublicVariable "newTime"
?(Time>=Param1):exit
goto "start"

3) Updateskiptimeserver.sqs
Quote
?!(Local Server):Exit

#start
? (daytime >= 4.5) && (daytime < 7.5):_delay = 2.5;_skip = .05
? (daytime >= 7.5) && (daytime < 16.5):_delay = 30;_skip = 0.4
? (daytime >= 16.5) && (daytime < 20):_delay = 2.5;_skip = .05
? ((daytime >= 20) && (daytime < 24)) || ((daytime > 0) && (daytime < 4.5)):_delay = 20;_skip = 0.4
~_delay
skipTime _skip
?(Time>=Param1):exit
goto "start"
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

B-2-0

  • Guest
Re:x2 accelerated time
« Reply #2 on: 22 Aug 2003, 03:20:38 »
Yeah....errrr.....i knew that already.....i was just testing u Terox....y'know, keeping u on the ball and all that ;D



Much apprieciated m8 :thumbsup: