OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Taggart on 30 Oct 2004, 15:59:43

Title: Time of Op
Post by: Taggart on 30 Oct 2004, 15:59:43
In a multiplayer mission I have tried to implement the Time of Op selection from the description.ext file, copying one used from a BAS mission. When you select the mission you have the "Time of Op" option in the "choose your role" page, but in the mission its still the time from the Intel box. Is there something you have to adjust, like a randomSeed class Intel or something, within the mission.sqm file  :)  As always thanx in advance
Title: Re:Time of Op
Post by: Zombie on 30 Oct 2004, 16:08:52
you need either a script to detect what your param is and skiptime that much, or a series of triggers to do the same thing.  Then you make sure the map time is set to midnight, and the skiptime script/triggers will adjust then time of day accordingly
Title: Re:Time of Op
Post by: Artak on 30 Oct 2004, 16:10:13
Noooo.. you're way off.  :)
Starting parameters (1 or 2) get different values depending on what you select in the pool. You've got to USE those values.

For example, this is from one of my missions:

description.ext
Code: [Select]
titleParam1 = "Time";
valuesParam1[] = {1, 2, 3, 4, 5};
defValueParam1 = 1;
textsParam1[] = {"Dawn", "Day", "Dusk", "Night", "Random"};

titleParam2 = "Weather";
valuesParam2[] = {1, 2, 3, 4, 5, 6};
defValueParam2 = 1;
textsParam2[] = {"Clear", "Overcast", "Foggy", "Rainy", "Storm", "Random"};

init.sqs
Code: [Select]
#time
?param1 == 2: skiptime 8
?param1 == 3: skiptime 14
?param1 == 4: skiptime 18
?param1 == 5: skiptime (random 18)

#weather
?param2 == 2: 0 setovercast 0.9
?param2 == 3: 0 setfog 0.8
?param2 == 4: 0 setovercast 0.75; 0 setrain 0.9
?param2 == 5: 0 setovercast 1; 0 setrain 1
?param2 == 6: 0 setfog (random 1); 0 setovercast (random 1); 0 setrain (random 1)
Title: Re:Time of Op
Post by: Taggart on 30 Oct 2004, 16:18:50
Thanx Artak for the quick response, basically I had it right for the description.ext but what I was looking for was the cross reference ie the init.sqs where the parameters are set. Thanx again  ;D
Title: Re:Time of Op
Post by: Commando on 31 Oct 2004, 03:42:33
this should be in a tutorial or something  ;D great stuff
im thinking about writing one , maybe i'll get it done before christmas  :)
Title: Re:Time of Op
Post by: Zombie on 31 Oct 2004, 15:19:21
yep, thats what I said, in more detail  ;)  Also don't forget to set the time in the editor to midnight or the skiptimes will be off