pogoman979 10 Posted September 1, 2009 - to your description.ext add following classclass Params { class Score { title = "$STR_mp_param_score"; values[] = {10,200}; texts[] = {"10","200"}; default = 10; }; class Duration { title = "$STR_mp_param_duration"; values[] = {1,2}; texts[] = {"one hour","two hours"}; default = 1; }; etc. ..... } - old style of parametrs definiton can be still used How to use multiple parameters in your MP mission: - values can be read from new variable paramsArray - variables param1 and param2 are still present - if param1 and param2 are defined, they can be read from paramsArray[0] and paramsArray[1] as well anyone got this working yet? i added it in and the params are defined in paramsArray, but theres no option to change them in the lobby. Share this post Link to post Share on other sites
maddogx 13 Posted September 1, 2009 There is now a button at the bottom of the lobby screen, where you can change parameters. Share this post Link to post Share on other sites
pogoman979 10 Posted September 1, 2009 dont suppose you could provide a screenshot or something cause i got nothing. the old param buttons were as plain as day, i seriously cant see anything at all with the new method. Share this post Link to post Share on other sites
mattxr 9 Posted September 1, 2009 dont suppose you could provide a screenshot or something cause i got nothing. the old param buttons were as plain as day, i seriously cant see anything at all with the new method. You making sure that you run-mod=beta; Although for me the params show up, i cant get them to change no matter what setting i use its the same ingame so i dont no :S i used the example mission. Share this post Link to post Share on other sites
pogoman979 10 Posted September 1, 2009 You making sure that you run-mod=beta;Although for me the params show up, i cant get them to change no matter what setting i use its the same ingame so i dont no :S i used the example mission. omg lol. i cant believe after all this time i forgot to do something so simple. yeah my target line was pointing to the beta exe but i didnt actually have -mod=beta; :S cheers Share this post Link to post Share on other sites
cobra4v320 27 Posted September 13, 2009 (edited) Need some help with the new class param: Here is my init: skiptime (paramsArray select 2); switch (param3) do { case 0: {setviewdistance 1000}; case 1: {setviewdistance 2000}; case 2: {setviewdistance 3000}; case 3: {setviewdistance 4000}; case 4: {setviewdistance 5000}; case 5: {setviewdistance 6000}; case 6: {setviewdistance 7000}; case 7: {setviewdistance 8000}; case 8: {setviewdistance 9000}; case 9: {setviewdistance 10000}; }; switch (param4) do { case 0: {setTerrainGrid 50}; case 1: {setterraingrid 25}; case 2: {setterraingrid 6.25}; }; Here is my description.ext: class Params { class DayTime { title = "Time Of Day"; values[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24}; texts[] = {"1:00", "2:00", "3:00", "4:00", "5:00", "6:00", "7:00", "8:00", "9:00", "10:00", "11:00", "12:00", "13:00", "14:00", "15:00", "16:00", "17:00", "18:00", "19:00", "20:00", "21:00", "22:00", "23:00", "24:00"}; default = 16; }; class Distance { title = "View Distance:"; values[] = {1,2,3,4,5,6,7,8,9,10}; texts[] = {"1000m","2000m","3000m","4000m","5000m","6000m","7000m","8000m","9000m","10000m"}; default = 3; }; class Grass { title = "Grass Options"; values[] = {1,2,3}; texts[] = {"No Grass", "Medium", "High"}; default = 2; }; }; The above is not working for me, does anyone see anything obvious, or something that I missed? Im also using Beta 59025. Edited September 13, 2009 by cobra4v320 Share this post Link to post Share on other sites
.kju 3245 Posted September 13, 2009 http://www.ofpec.com/intel_depot/index.php?action=read_on&id=435 Share this post Link to post Share on other sites
cobra4v320 27 Posted September 13, 2009 (edited) Thanks kju, However I have already read that before posting, the mission and tutorial are not very good. I will continue to troubleshoot but as I said before if anyone can spot the obvious please let me know. ---------- Post added at 08:27 AM ---------- Previous post was at 07:55 AM ---------- I have also tried using this in the init.sqf if (isServer) then { if (!isNil "param2") then { skiptime param2; } else { skiptime 16; }; }; if (isServer) then { if (!isNil "param3") then { setviewdistance param3; } else { setviewdistance 3000; }; }; if (isServer) then { if (!isNil "param4") then { setterraingrid param4; } else { setterraingrid 25; }; }; Also tried this: skiptime (paramsArray select 2); setviewdistance (paramsArray select 3); setterraingrid (paramsArray select 4); Edited September 13, 2009 by cobra4v320 Share this post Link to post Share on other sites
tophe 69 Posted September 13, 2009 Thanks kju,However I have already read that before posting, the mission and tutorial are not very good. I will continue to troubleshoot but as I said before if anyone can spot the obvious please let me know. ---------- Post added at 08:27 AM ---------- Previous post was at 07:55 AM ---------- I have also tried using this in the init.sqf if (isServer) then { if (!isNil "param2") then { skiptime param2; } else { skiptime 16; }; }; if (isServer) then { if (!isNil "param3") then { setviewdistance param3; } else { setviewdistance 3000; }; }; if (isServer) then { if (!isNil "param4") then { setterraingrid param4; } else { setterraingrid 25; }; }; Also tried this: skiptime (paramsArray select 2); setviewdistance (paramsArray select 3); setterraingrid (paramsArray select 4); You can not use the commands param3, param4 etc.. You need to use the paramsArray command. What I usually do is put the parameter values in variables, it works much better. You will not need the !isNil since the parameters will always have a value. Just set the default value to what you want if the admin doesn't choose one. Then do this. viewdistvariable = paramsArray select 3; Then use the variable to check the parameter value. Sometime it works fine checking the parameter array and sometimes it doesn't. So it's a good idea to use variables. I did that in the latest EVO~Blue, you can check that mission out if you want. It has 12 parameters. Share this post Link to post Share on other sites
cobra4v320 27 Posted September 13, 2009 (edited) Tophe tried your mission here the parameters don't even show up under the MP mission setup. Im using beta 59025 Im assuming that is not the problem? Here is my new description.ext: class Params { class Missiontime { //paramsArray[2] title="Time Of Day"; values[]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23}; texts[]={"00:00","01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00","13:00","14:00","15:00","16:00","17:00","18:00","19:00","20:00","21:00","22:00","23:00"}; default=5; }; class Grass { //paramsArray[3] title = "Grass"; values[]={0,1,2,3,4}; texts[]={"No Grass", "Default MP", "Default SP", "More", "Max"}; default=0; }; class View { //paramsArray[4] title = "View distance"; values[]={0,1,2,3,4,5,6,7,8,9}; texts[]={"1000 m","2000 m","3000 m","4000 m","5000 m","6000 m","7000 m","8000 m","9000 m","10000 m"}; default=2; }; class Environment { //paramsArray[5] title = "Enable Environment"; values[]={0,1}; texts[]={"true","false"}; default=1; }; }; Here is my init.sqf: timeparam = paramsArray select 2; if (timeparam == 0) then {skiptime 0}; if (timeparam == 1) then {skiptime 1}; if (timeparam == 2) then {skiptime 2}; if (timeparam == 3) then {skiptime 3}; if (timeparam == 4) then {skiptime 4}; if (timeparam == 5) then {skiptime 5}; if (timeparam == 6) then {skiptime 6}; if (timeparam == 7) then {skiptime 7}; if (timeparam == 8) then {skiptime 8}; if (timeparam == 9) then {skiptime 9}; if (timeparam == 10) then {skiptime 10}; if (timeparam == 11) then {skiptime 11}; if (timeparam == 12) then {skiptime 12}; if (timeparam == 13) then {skiptime 13}; if (timeparam == 14) then {skiptime 14}; if (timeparam == 15) then {skiptime 15}; if (timeparam == 16) then {skiptime 16}; if (timeparam == 17) then {skiptime 17}; if (timeparam == 18) then {skiptime 18}; if (timeparam == 19) then {skiptime 19}; if (timeparam == 20) then {skiptime 20}; if (timeparam == 21) then {skiptime 21}; if (timeparam == 22) then {skiptime 22}; if (timeparam == 23) then {skiptime 23}; grassparam = paramsArray select 3; if (grassparam == 0) then {setTerrainGrid 50}; if (grassparam == 1) then {setTerrainGrid 25}; if (grassparam == 2) then {setTerrainGrid 12.5}; if (grassparam == 3) then {setTerrainGrid 6.25}; if (grassparam == 4) then {setTerrainGrid 3.125}; viewparam = paramsArray select 4; if (viewparam == 0) then {setviewdistance 1000}; if (viewparam == 1) then {setviewdistance 2000}; if (viewparam == 2) then {setviewdistance 3000}; if (viewparam == 3) then {setviewdistance 4000}; if (viewparam == 4) then {setviewdistance 5000}; if (viewparam == 5) then {setviewdistance 6000}; if (viewparam == 6) then {setviewdistance 7000}; if (viewparam == 7) then {setviewdistance 8000}; if (viewparam == 8) then {setviewdistance 9000}; if (viewparam == 9) then {setviewdistance 10000}; environmentparam = paramsArray select 5; if (environmentparam == 0) then {enableenvironment true}; if (environmentparam == 1) then {enableenvironment false}; Edited September 13, 2009 by cobra4v320 Share this post Link to post Share on other sites
cobra4v320 27 Posted September 14, 2009 (edited) Okay I figured out how to get it to work: Description.ext: class Params { class View { title="View Distance"; values[]={0,1,2,3,4,5,6,7,8,9}; texts[]={"1000m","2000m","3000m","4000m","5000m","6000m","7000m","8000m","9000m","10000m"}; default = 0; }; class Grass { title="Grass"; values[]={0,1,2,3,4}; texts[]={"No Grass", "Default MP", "Default SP", "More", "Max"}; default = 0; }; class Environment { title="Enable Environment"; values[]={0,1}; texts[]={"True","False"}; default = 1; }; class Missiontime { title="Time Of Day"; values[]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23}; texts[]={"00:00","01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00","13:00","14:00","15:00","16:00","17:00","18:00","19:00","20:00","21:00","22:00","23:00"}; default=5; }; }; Init.sqf viewparam = (paramsArray select 0); if (viewparam == 0) then {setViewDistance 1000}; if (viewparam == 1) then {setViewDistance 2000}; if (viewparam == 2) then {setViewDistance 3000}; if (viewparam == 3) then {setViewDistance 4000}; if (viewparam == 4) then {setViewDistance 5000}; if (viewparam == 5) then {setViewDistance 6000}; if (viewparam == 6) then {setViewDistance 7000}; if (viewparam == 7) then {setViewDistance 8000}; if (viewparam == 8) then {setViewDistance 9000}; if (viewparam == 9) then {setViewDistance 10000}; grassparam = (paramsArray select 1); if (grassparam == 0) then {setTerrainGrid 50}; if (grassparam == 1) then {setTerrainGrid 25}; if (grassparam == 2) then {setTerrainGrid 12.5}; if (grassparam == 3) then {setTerrainGrid 6.25}; if (grassparam == 4) then {setTerrainGrid 3.125}; environment = (paramsarray select 2); if (environment == 0) then {enableEnvironment true}; if (environment == 1) then {enableEnvironment false}; timeparam = (paramsArray select 3); if (timeparam == 0) then {skiptime 0}; if (timeparam == 1) then {skiptime 1}; if (timeparam == 2) then {skiptime 2}; if (timeparam == 3) then {skiptime 3}; if (timeparam == 4) then {skiptime 4}; if (timeparam == 5) then {skiptime 5}; if (timeparam == 6) then {skiptime 6}; if (timeparam == 7) then {skiptime 7}; if (timeparam == 8) then {skiptime 8}; if (timeparam == 9) then {skiptime 9}; if (timeparam == 10) then {skiptime 10}; if (timeparam == 11) then {skiptime 11}; if (timeparam == 12) then {skiptime 12}; if (timeparam == 13) then {skiptime 13}; if (timeparam == 14) then {skiptime 14}; if (timeparam == 15) then {skiptime 15}; if (timeparam == 16) then {skiptime 16}; if (timeparam == 17) then {skiptime 17}; if (timeparam == 18) then {skiptime 18}; if (timeparam == 19) then {skiptime 19}; if (timeparam == 20) then {skiptime 20}; if (timeparam == 21) then {skiptime 21}; if (timeparam == 22) then {skiptime 22}; if (timeparam == 23) then {skiptime 23}; Edited September 14, 2009 by cobra4v320 Share this post Link to post Share on other sites
tophe 69 Posted September 14, 2009 Tophe tried your mission here the parameters don't even show up under the MP mission setup.Im using beta 59025 Im assuming that is not the problem? Here is my new description.ext: class Params { class Missiontime { //paramsArray[2] title="Time Of Day"; values[]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23}; texts[]={"00:00","01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00","13:00","14:00","15:00","16:00","17:00","18:00","19:00","20:00","21:00","22:00","23:00"}; default=5; }; class Grass { //paramsArray[3] title = "Grass"; values[]={0,1,2,3,4}; texts[]={"No Grass", "Default MP", "Default SP", "More", "Max"}; default=0; }; class View { //paramsArray[4] title = "View distance"; values[]={0,1,2,3,4,5,6,7,8,9}; texts[]={"1000 m","2000 m","3000 m","4000 m","5000 m","6000 m","7000 m","8000 m","9000 m","10000 m"}; default=2; }; class Environment { //paramsArray[5] title = "Enable Environment"; values[]={0,1}; texts[]={"true","false"}; default=1; }; }; Here is my init.sqf: timeparam = paramsArray select 2; if (timeparam == 0) then {skiptime 0}; if (timeparam == 1) then {skiptime 1}; if (timeparam == 2) then {skiptime 2}; if (timeparam == 3) then {skiptime 3}; if (timeparam == 4) then {skiptime 4}; if (timeparam == 5) then {skiptime 5}; if (timeparam == 6) then {skiptime 6}; if (timeparam == 7) then {skiptime 7}; if (timeparam == 8) then {skiptime 8}; if (timeparam == 9) then {skiptime 9}; if (timeparam == 10) then {skiptime 10}; if (timeparam == 11) then {skiptime 11}; if (timeparam == 12) then {skiptime 12}; if (timeparam == 13) then {skiptime 13}; if (timeparam == 14) then {skiptime 14}; if (timeparam == 15) then {skiptime 15}; if (timeparam == 16) then {skiptime 16}; if (timeparam == 17) then {skiptime 17}; if (timeparam == 18) then {skiptime 18}; if (timeparam == 19) then {skiptime 19}; if (timeparam == 20) then {skiptime 20}; if (timeparam == 21) then {skiptime 21}; if (timeparam == 22) then {skiptime 22}; if (timeparam == 23) then {skiptime 23}; grassparam = paramsArray select 3; if (grassparam == 0) then {setTerrainGrid 50}; if (grassparam == 1) then {setTerrainGrid 25}; if (grassparam == 2) then {setTerrainGrid 12.5}; if (grassparam == 3) then {setTerrainGrid 6.25}; if (grassparam == 4) then {setTerrainGrid 3.125}; viewparam = paramsArray select 4; if (viewparam == 0) then {setviewdistance 1000}; if (viewparam == 1) then {setviewdistance 2000}; if (viewparam == 2) then {setviewdistance 3000}; if (viewparam == 3) then {setviewdistance 4000}; if (viewparam == 4) then {setviewdistance 5000}; if (viewparam == 5) then {setviewdistance 6000}; if (viewparam == 6) then {setviewdistance 7000}; if (viewparam == 7) then {setviewdistance 8000}; if (viewparam == 8) then {setviewdistance 9000}; if (viewparam == 9) then {setviewdistance 10000}; environmentparam = paramsArray select 5; if (environmentparam == 0) then {enableenvironment true}; if (environmentparam == 1) then {enableenvironment false}; You must have downloaded the wrong mission or done something weird.. Glad to hear you've got it working though. Share this post Link to post Share on other sites