Home   Help Search Login Register  

Author Topic: Selecting Time  (Read 1481 times)

0 Members and 1 Guest are viewing this topic.

Jim666

  • Guest
Selecting Time
« on: 19 Feb 2005, 17:38:09 »
Ive seen this being used before in Multiplayer missions. At the start where you have all of the players waiting etc, to take slots. it has the paremeters for that missions. I'd like one for the mission im making where you can select, Day Dawn Dusk Night>

Appreciate any help.

Offline Platoon Patton

  • Members
  • *
  • "Barbecue" CreateVehicle getpos LLama
Re:Selecting Time
« Reply #1 on: 19 Feb 2005, 18:54:12 »
titleParam1 = "DAYTIME";
valuesParam1[] = {1,2,3,4,5,6,7,8};
defValueParam1 = 1;
textsParam1[] = {"Random", "Dawn", "Midday", "Dusk & Autoflares", "Dusk", "Night & Autoflares", "Night", "24hrs & Autoflare", "24hrs"};

All in description.ext

Run a script where u handle all values:
?(param1 == 1):goto "Random"
?(param1 == 2):goto "Dawn"
?(param1 == 3):goto "Midday"
?(param1 == 4):goto "Dusk"
?(param1 == 5):goto "Dusknoflare"
?(param1 == 6):goto "Night"
?(param1 == 7):goto "Nightnoflare"
?(param1 == 8 ):goto "DAYNIGHTDAY"
?(param1 == 9):goto "DAYNIGHTDAYnoflare"

Use SkipTime to adjust time.
« Last Edit: 19 Feb 2005, 18:55:04 by Platoon Patton »
http://www.platoon-clan.com/ We always wellcome dedicated OFP players :)

http://www.european-combat-league.com/index.php To play with us in the best OFP league ;)

Jim666

  • Guest
Re:Selecting Time
« Reply #2 on: 20 Feb 2005, 01:48:27 »
Um...  ??? thats um confused, i dont get how you mean put the bottom stuff in a script? could you just make an example mission? i'd aprreciate!

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:Selecting Time
« Reply #3 on: 20 Feb 2005, 12:11:07 »
MISSION EDITOR
NB>> set your mission time to midnight
then adjust the skiptime values for dusk & dawn so that you get your required light settings, eg just as the sun rises and sets.
These values will differ depending on the date throughout the year

DESCRIPTION.ext
Quote
titleParam1 = "DAYTIME";
valuesParam1[] = {1,2,3,4};
defValueParam1 = 2;
textsParam1[] = {"Dawn", "Midday", "Dusk", "Night"};


INIT.sqs
Quote
?(param1 == 1):goto "Dawn"
?(param1 == 2):goto "Midday"
?(param1 == 3):goto "Dusk"
?(param1 == 4):goto "Night"

#DAWN
skiptime 6.3
goto "Param1_END"

#MIDDAY
skiptime 12
goto "Param1_END"

#DUSK
skiptime 18.2
goto "Param1_END"

#NIGHT
;;;skiptime 0
goto "Param1_END"

#Param1_END

;;; add additional init.sqs entries

You only need 4 settings to create the 4 light settings, no need for all this
15:00 hrs
16:00 hrs
17:00 hrs mallarky

there are additional enhancements that you can add, such as an accelerated time frame, eg a full 24 hrs in 30 minutes of game, sunrise, sunset etc

you can also have some form of flare lighting to enhance your nightime missions ambience.
This requires additional scripting and knowledge of how client and servers work independantly to one n other.

For now, the above basic system will suit your needs.

There is also the possibility to use the Param2 values for additional options

eg

**************************************************
DESCRIPTION.ext
Quote
titleParam2 = "OPTIONS";
valuesParam2[] = {1,2,3};
defValueParam2 = 2;
textsParam1[] = {"Option A", "Option B", "Option C"};


INIT.sqs
Quote
?(param2 == 1):goto "Option_A"
?(param2 == 2):goto "Option_B"
?(param2 == 3):goto "Option_C"


#Option_A
;;; Examples of things you could do
deletevehicle XXXXX
Player setviewdistance XXXXX
0 setfog 1

Player removeallweapons
Player addweapon "XXXX"
Player addmagazines "XXXX"
goto "Param2_END"

#Option_B
;;; add option B entries
goto "Param2_END

#Option_C
;;; add option C entries
goto "Param2_END"

#Param2_END

good luck with your mission !!!!




« Last Edit: 20 Feb 2005, 12:16:05 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Jim666

  • Guest
Re:Selecting Time
« Reply #4 on: 20 Feb 2005, 16:57:13 »
Sweet it works, thanks!

Rocko Bonaparte

  • Guest
Re:Selecting Time
« Reply #5 on: 20 Feb 2005, 20:02:23 »
I'd just like to add that you don't need to assign the names to numbers 1-7 or whatever your span is.  You can assign them directly to the amount of time you want them to skip.  Like so:
Code: [Select]
titleParam1 = "DAYTIME";
valuesParam1[] = {500,1200,1800,0};
defValueParam1 = 500;
textsParam1[] = {"Dawn", "Midday", "Dusk", "Night"};
I set the default value to the same value was dawn, as that's what would be chosen by default when you first choose the mission.