Jump to content
Sign in to follow this  
NeilReed101

skiptime to create daylight only

Recommended Posts

Hi iam creating a mission that requires the computer to be on for 48 hours . but i only want the mission during the daylight hours between 7.30 and 3.30

how can i use skiptime command to skip time at 3.30 back or forward to 7.30 . constantly/ or looped.

can i use a trigger that activates at 3.30pm all the time and skips time to 7.30am ?

thanks

Share this post


Link to post
Share on other sites

Cross posting is not allowed, stick to one thread please smile_o.gif

Share this post


Link to post
Share on other sites

Think you could have a trig set to daytime == 15.5, then do your skip time in the activation to 7.30 the next morn.

Cheers

GC

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">// Skips nights -Nev (modified Kiljoy's timeskip.sqf)

sleep 1.0;

_temp = compile gdate_packed;

_date = call _temp;

setDate _date;

rscripts=rscripts+1;

for [{_loop=0}, {_loop<1}, {_loop=_loop}] do

{

  sleep 3600.0;

  if ((daytime < 7.5) OR (daytime > 15.5)) then

  {

  setDate [date select 0,date select 1,date select 2,(date select 3)+14,date select 4] // skip ahead 14 hours

  }

};

Execute this script in init.sqf. Every 30 minutes it will check to see if it's earlier than 7.30am or later than 3.30pm. If it is, it bumps the clock ahead by 14 hours.

Share this post


Link to post
Share on other sites

Oh, yeah, a trigger might work better for what you are doing. Sorry. smile_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×