Home   Help Search Login Register  

Author Topic: Multiplayer options  (Read 1471 times)

0 Members and 2 Guests are viewing this topic.

TH

  • Guest
Multiplayer options
« on: 05 Jul 2004, 23:23:43 »
yea, i saw the post below me.. but i dont know much about anything and cant figure out how to do this...

Code: [Select]
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

Quote:

#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

i want a choice for time limit, i have the script already working but i want to have a option of 15minutes 25 minutes and 30minutes. i also want one for time of day. i get the top part of this but cant get what to put in the rest.. can someone help me?

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Multiplayer options
« Reply #1 on: 05 Jul 2004, 23:38:57 »
Code: [Select]
to description.ext

titleParam1 = "Time Of Day";
valuesParam1[] = {1,2,3,4};
defValueParam1 = 1;
textsParam1[] = {"Dawn","Day","Dusk","Night"};

titleParam2 = "Time To Play";
valuesParam2[] = {1,2,3};
defValueParam2 = 1;
textsParam2[] = {"15 min","25 min", "30 min"};


and then to inititiate these settings, you would do something like the following

to init.sqs

#PARAM1_OPTIONS
?(param1 == 1):goto "dawn"
?(param1 == 2):goto "day"
?(param1 == 3):goto "dusk"
?(param1 == 3):goto "night"
hint "DEBUG: Param 1 options set up incorrectly"
goto "PARAM2_OPTIONS"

#dawn
;no change. dawn set in editor at 0600
goto "PARAM2_OPTIONS"

#day
skiptime 8
goto "PARAM2_OPTIONS"

#dusk
skiptime 12
goto "PARAM2_OPTIONS"

#night
skiptime 18

#PARAM2_OPTIONS
?(param2 == 1):goto "15min"
?(param2 == 2):goto "25min"
?(param2 == 3):goto "30min"
hint "DEBUG: Param 2 options set up incorrectly"
goto "NEXT"

#15min
[15] exec "countdownscript.sqs"
goto "NEXT"

#25min
[25] exec "countdownscript.sqs"
goto "NEXT"

#30min
[30] exec "countdownscript.sqs"
goto "NEXT"

#NEXT
;init.sqs continues

I think the example you have there is very easy to understand, but maybe the above will help you to get the point? Or what is it that's bothering you exactly?
Not all is lost.

TH

  • Guest
Re:Multiplayer options
« Reply #2 on: 06 Jul 2004, 00:28:31 »
ah thanks artak, i figured it out.. i was tired, didnt really think about it  ::)