Home   Help Search Login Register  

Author Topic: Time of op?  (Read 1412 times)

0 Members and 2 Guests are viewing this topic.

Offline Alan34

  • Members
  • *
  • Praise the Lord and pass the Carl Gustav
    • Red Devils
Time of op?
« on: 19 Nov 2002, 02:32:52 »
I was playing a MP game the other day and saw a combo box in the set up screen where u could specify the time when the mission starts. How can I add this feature to my maps?

Tactician

  • Guest
Re:Time of op?
« Reply #1 on: 19 Nov 2002, 13:33:23 »
First, you need to change the time of your map to midnight in the editor.

Open up your description.ext file, you know, the one where you specify the respawn type and delay.  Put in the following code somewhere within:

Code: [Select]
titleParam2 = "Time of Day:";
valuesParam2[] = {7.5, 12, 17, 22};
defValueParam2 = 12;
textsParam2[] = {"Morning", "Noon", "Afternoon", "Night"};

Each number in the valuesParam2 section represents the number of hours to skip ahead for each selection.  You should change these depending on how much daylight you want in each situation on the day of the year you've chosen.

When someone selects "Morning" for example, param2 will be set to 7.5, making the mission time 7:30.  Selecting "Night" will set the time ahead 22 hours to 10:00 p.m.

Now we need to put the selected number in action.  Put this line in your init.sqs:

Code: [Select]
skipTime param2
Congrats, you should now be able to select the time of day, defaulting to noon.  Let me know if I left anything out.

Offline Alan34

  • Members
  • *
  • Praise the Lord and pass the Carl Gustav
    • Red Devils
Re:Time of op?
« Reply #2 on: 20 Nov 2002, 05:17:47 »
Works great :D  Mucho thanks