Home   Help Search Login Register  

Author Topic: how to make 24h day no night  (Read 1707 times)

0 Members and 1 Guest are viewing this topic.

Offline damdam

  • Members
  • *
how to make 24h day no night
« on: 21 Jun 2009, 22:23:21 »
how can i have a mission with only day time we dont like to play at night. i like to have it played only at day time with no interruption of night the missions are long. thx

Offline JamesF1

  • Editors Depot Staff
  • *****
    • JamesBurgess.co.uk
Re: how to make 24h day no night
« Reply #1 on: 21 Jun 2009, 22:36:34 »
Have a script that runs, say, every 30 seconds skipping time back 30 seconds? (or similar)

Offline damdam

  • Members
  • *
Re: how to make 24h day no night
« Reply #2 on: 21 Jun 2009, 23:05:03 »
i am not good with scripting is there anybody that can provide me with

Offline Luke

  • Members
  • *
  • Thank God! The OFPEC Staff are here!
Re: how to make 24h day no night
« Reply #3 on: 22 Jun 2009, 06:32:05 »
If this is completely new to you, I'll try and walk you through the steps.

What you do is find your mission folder.
If it happens to be an editor mission, that folder is in your documents.
(I believe like this "C:\Documents and Settings\Your Name\Arma\Missions", I am not entirely sure.)

In that folder create a text document.
Name the document so that it is "name_of_script.txt",
naming it whatever you want to.

Now, change the ".txt" part to ".sqf".

Open the text document and enter the following
Code: [Select]
//  (// at the beginning of a line marks that line as a comment)
//  Script for maintaining time

_today = date;

while {true} do
   {
   setdate _today;
   sleep 10;
   };

In your mission (in the actual editor) put in the players init line:
Code: [Select]
[] execvm "name_of_script.sqf".

All it does is find the date and time, saves it as a variable (today),
and as long as the condition for while is satisfied, (in this case true, which will continue the loop infinitely)
the coding resets the time to the instant the script started, resetting back after every 10 seconds.

(The sleep 10 controls the interval in seconds, you can change it,
but if you delete it, your computer will begin to lag severely.)

Hope that all helps.

Luke
Pesky Human!!
Wort Wort Wort.

Offline damdam

  • Members
  • *
Re: how to make 24h day no night
« Reply #4 on: 22 Jun 2009, 12:49:43 »
Thx JamesF1 and Luke for ur help i fix it with LINK :good: