OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: evil on 03 Jul 2004, 05:21:09
-
Maybe I'm just oblivious but to me it seems this should be easy enough to do...
You know how on some MP Missions theres selectable options before you start? Like Max Score and stuff like that? How do you make those?
-
set the options up in the description.ext
DESCRIPTION.EXT
titleParam1 = "Add Option name here";
valuesParam1[] = {1,2,3};
defValueParam1 = 1;
textsParam1[] = {"Option A","Option B","Op[tion C"};
titleParam2 = "Add Option name here";
valuesParam2[] = {1,2,3};
defValueParam2 = 1;
textsParam2[] = {"Option 1","Option 2", "Option 3"};
and then to inititiate these settings, you would do something like the following
INIT.SQS
#PARAM1_OPTIONS
?(param1 == 1):goto "PARAM1OPTION_A"
?(param1 == 2):goto "PARAM1OPTION_B"
?(param1 == 3):goto "PARAM1OPTION_C"
hint "DEBUG: Param 1 options set up incorrectly"
goto "PARAM2_OPTIONS"
#PARAM1OPTION_A
Add your param 1 option A commands, eg skiptime etc etc
goto "PARAM2_OPTIONS"
#PARAM1OPTION_B
Add your param 1 option B commands, eg skiptime etc etc
goto "PARAM2_OPTIONS"
#PARAM1OPTION_C
Add your param 1 option C commands, eg skiptime etc etc
goto "PARAM2_OPTIONS"
#PARAM2_OPTIONS
?(param2 == 1):goto "PARAM2OPTION_1"
?(param2 == 2):goto "PARAM2OPTION_2"
?(param2 == 3):goto "PARAM2OPTION_3"
hint "DEBUG: Param 2 options set up incorrectly"
goto "NEXT"
#PARAM2OPTION_1
Add your param 2 option 1 commands, eg setweather etc etc
goto "NEXT"
#PARAM2OPTION_2
Add your param 2 option 2 commands, eg setweather etc etc
goto "NEXT"
#PARAM2OPTION_3
Add your param 2 option 3 commands, eg setweather etc etc
goto "NEXT"
#NEXT
Add your common commands that param1 and param2 dont affect
if you see the hint "DEBUG:............." lines then you didnt do it correctly
-
Simple enough and works great! BTW it's like you read my mind. I wanted two options for time and weather lol. Thanks for the help.