meatball 25 Posted July 6, 2013 I've figured out the basics for mission parameters and as of right now I'm adding in parameters for Number of Enemy and Enemy skill levels by adding the following to my description.ext class Params { class numberOfEnemies { // paramsArray[0] title = "Number of Enemies"; values[] = {0.25,0.5,0.75,1}; texts[] = {"Few (Good for 1-2 Players)","Some (Good for 3-4 Players)","Many (Good for 5-6 Players)","There's too many! (Good for 7-8 Players)"}; default = 0.5; }; class enemySkill { // paramsArray[1] title = "Enemy Skill Level"; values[] = {0.15,0.3,0.5,0.8}; texts[] = {"Easy", "Normal", "Hard", "Extreme"}; default = 0.3; }; }; Then I added the following to my init.sqf numEnemies = (paramsArray select 0); enemySkill = (paramsArray select 1); I then use those global vars in misc scripts/trigger calls and they're working fine. Problem is, the 'default' value is not working. If I don't specifically go into the mission parameters and make a choice, both numEnemies and enemySkill return the value of 0. I know I can fix that with a simple 'if numEnemies = 0 then numEnemies = .5' or something like that right after I do the paramsArray select in the init, but that just seems sloppy. What am I missing to force those default values even if the players don't choose them? Secondly, how would I go about adding parameters for the players to set time/weather? Thanks! Share this post Link to post Share on other sites
falconx1 13 Posted July 6, 2013 (edited) maybe u cant use decimals lol i dont know why ur defaults dont work for time: parameters.hpp //-- param 2 class TimeofDayHour { title = "Time of Day Hour"; 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 = 9; }; //-- param 3 class TimeofDayMinute { title = "Time of Day Minutes"; 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,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59}; texts[] = {"0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"}; default = 30; }; init.sqf //---Read the Time curTimeHour = (paramsArray select 2); curTimeMinutes = (paramsArray select 3); if (isNil "curTimeHour") then {curTimeHour = 9}; if (isNil "curTimeMinutes") then {curTimeMinutes = 30}; setDate [2035, 7, 4, curTimeHour, curTimeMinutes]; AI param try using full numbers then check them later //-- param 4 class AISkill { title = "AI Skill Level"; values[] = {1,2,3,4,5}; texts[] = {"Novice","Rookie","Veteran","Expert","Elite"}; default = 1; }; INIT.sqf //---Read AI Skill Level -- SELECT ENEMY AI SKILL. Using the value from param AISkill. AICurrentSkill = (paramsArray select 4); switch (AICurrentSkill) do { //Novice case 1: { AICurrentSkill = 0.25; }; //Rookie case 2: { AICurrentSkill = 0.45; }; //Veteran case 3: { AICurrentSkill = 0.65; }; //Expert case 4: { AICurrentSkill = 0.85; }; //Elite case 5: { AICurrentSkill = 0.95; }; }; Edited July 6, 2013 by falconx1 Share this post Link to post Share on other sites
meatball 25 Posted July 6, 2013 Perfect, thank you! That was indeed it, the defaults can't be decimals, so I had to use the switch setup to do them. Any idea on how to allow changeable weather? Share this post Link to post Share on other sites
meatball 25 Posted August 26, 2013 Does anyone have a good understanding of how to change weather settings based on selectable mission parameters in a multiplayer mission? I think I have the basics down, but doesn't appear to be working right. I play to leave Rain/Lighting/Waves and Wind set to auto and just let the players set Cloud Cover and Fog levels to start. I have the following in my description.ext // paramsArray[5] class weatherClouds { title = "Cloud Cover"; values[] = {0,1,2,3,4}; texts[] = {"Clear","Partly Cloudy","Light Rain","Heavy Rain","Random"}; default = 0; }; // paramsArray[6] class weatherFog { title = "Fog Level"; values[] = {0,1,2,3,4}; texts[] = {"No Fog","Light Fog","Medium Fog","Heavy Fog","Random"}; default = 0; }; Then I have the following in my init.sqf: // Weather : Cloud Cover weatherClouds = (paramsArray select 5); switch (weatherClouds) do{ case 1: {0 setOvercast 0;}; // Clear case 2: {0 setOvercast .2;}; // Partly Cloudy case 3: {0 setOvercast .5;}; // Light Rain case 4: {0 setOvercast .95;}; // Heavy Rain case 5: {0 setOvercast random(floor(1));}; // Random }; // Weather : Fog Cover weatherFog = (paramsArray select 6); switch (weatherFog) do{ case 1: {0 setFog 0;}; // No Fog case 2: {0 setFog .35;}; // Light Fog case 3: {0 setFog .60;}; // Medium Fog case 4: {0 setFog .90}; // Heavy Fog case 5: {0 setFog (random(1))}; // Random }; Fog seems to work. Cloud cover...not so much. Anyone notice anything I'm missing? Two additional questions. How do I handle this for MP missions with possible JiP? If I just set it on the server, with that synch automatically to all clients as they connect at the beginning or JiP, or is there something else I need to do? Share this post Link to post Share on other sites
EVO-Caeden 10 Posted March 18, 2015 Thanks a million for this. I've been looking forever. Of all the things for editing and mission making in Arma 3, this is by far the longest treasure hunt I've had to do for information. And its about Mission Parameters. Something which in my opinion should not be this difficult. Share this post Link to post Share on other sites
Larrow 2822 Posted March 18, 2015 Wiki page for Params maybe handy if you have not come across it yet. Share this post Link to post Share on other sites
epicgoldenwarrior 11 Posted March 18, 2015 I know simple 1 line code parameters for time of day & weather, if you'd like. Shorter than doing hour 1 2 3 4 etc. lol. Share this post Link to post Share on other sites
Nightmareshadow 0 Posted December 18, 2015 How do you disable / graying a paramter with another parameter. For examaple I've set up some parameters to configure ACE3 medic modules. Now I want to graying the paramters for the advanced system when the basic system is selected, because there is no need to define them anymore. I've seen things like this before, but I've lost the mission data. Share this post Link to post Share on other sites