OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: zipp on 23 Sep 2003, 19:05:21
-
I appologise if this has been asked before. I was wondering if anyone here could point me to the informaion I need.
I am wanting to make the mission time selectable at mission start in Mp as well as SP (Just like BAS). I have DePBOed the BAS missions but i cant tell what needs to be done. Can someone tell me what files need to be present, or better yet, Point me in the direction of a tut or thread with the information
Thanks in advance
-
Well this can easily be done using just the init.sqs and the Description.EXT
To make it easier for yourself, set your mission start time to Midnight
then add the following lines in your description.EXT, removing all previous Param1 entries
Description.EXT
titleParam1 = "DAYTIME";
valuesParam1[] = {1,2,3,4};
defValueParam1 = 1;
textsParam1[] = {"Dawn", "Midday", "Dusk", "Night"};
Init.sqs
?(param1==1):skiptime 6.2
?(param1==2):skiptime 12
?(param1==3):skiptime 18.4
?(param1==4):skiptime 0
(The skiptime values for Dawn and dusk may need to be adjusted depending what month you used, but they are fairly close)
add the following line if you use an endgame script waiting for [color]time>= param1[/color]
param1 = 1800
this will reset the gametime to 30 minutes
NB>>> make sure the endgame script doesnt activate as soon as the game starts by simply adding a [color]~10[/color] seconds line to the start of that script
Alternatively if you wanted the Param1 variable to still be used for mission length options, you could simply use Param2 instead (This is normally used for score limit)