PTW-105 10 Posted October 13, 2013 Hello, I'm implementing the F/A-18 from John_Spartan and Saul into a mission of mine. I would like a selectable MP mission parameter that would set the default loadout for the two F/A-18E's and one 18F in my mission. I've used the following resources to get to where I am: http://forums.bistudio.com/showthread.php?153495-Time-of-Day-Parameter http://forums.bistudio.com/showthread.php?165221-MP-Mission-Param This is the code I have so far in my description.ext file: class Params{ class defaultLoadout { title= "Default F/A-18 Loadout"; texts[]= {"Empty","Multirole","CAS","CAP"}; values[]= {0,1,2,3}; default= 1; }; class respawnEnabled { title= "Enable Respawn"; texts[]= {"Yes","No"}; values[]= {1,0}; default=1; }; }; I am not sure where to go from here. I have not created my init.sqf file yet since I can't figure out how to get those variables to change what is set in the init script of the empty units. The respawn code is there as an extension of the loadout code, and can be ignored. I would like to eventually allow a quick toggle in the MP mission params to start the mission with/without respawn, but I'll worry about the loadout code first. Any help would be appreciated. Thanks in advance, PTW-105 Share this post Link to post Share on other sites
kylania 568 Posted October 13, 2013 Might be helpful to read the links you posted. In one I tell you what to put in your init.sqf to get the values. Share this post Link to post Share on other sites
PTW-105 10 Posted October 13, 2013 Kylania, I did see your post in the second link: init.sqf:PHP Code: timelimit = paramsArray select 0; scorelimit = paramsArray select 1; I can create an init.sqf file with the following contents: defaultLoadout = paramsArray select 0; enableRespawn = paramsArray select 1; But this isn't complete. I understand that putting these params in the init file, your users can select and change these variables in the MP mission params screen, but I'm having trouble where rubber meets road. I can't get the parameters the user selects to actually change the loadouts for the aircraft. If possible, I see this working like some sort of IF/ELSEIF/ELSE statement: $emptyLoadout = "fa18_dynamic_loadoutscript = [_FA18, "js_m_fa18_empty", "js_m_fa18_empty","js_m_fa18_empty","js_m_fa18_empty","js_m_fa18_empty","js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty","js_m_fa18_empty","js_m_fa18_empty","js_m_fa18_empty","js_m_fa18_empty","js_m_fa18_empty","js_m_fa18_empty","js_m_fa18_empty","js_m_fa18_empty","js_m_fa18_empty"] execvm "js_fa18\scripts\FA18_dynamic_loadouts.sqf";" $multiroleLoadout = "fa18_dynamic_loadoutscript = [_FA18, "js_m_fa18_aim9x_x1", "js_m_fa18_aim9x_x1","js_m_fa18_aim120c_x1","js_m_fa18_aim120c_x1","js_m_fa18_aim120c_x1","js_m_fa18_aim120c_x1", "js_m_fa18_bombrack_x1", "js_m_fa18_bombrack_x1", "js_m_fa18_aim120c_x1", "js_m_fa18_aim120c_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty","js_m_fa18_wing_tank_x1"] execvm "js_fa18\scripts\FA18_dynamic_loadouts.sqf"; $casLoadout = "fa18_dynamic_loadoutscript = [_FA18, "js_m_fa18_aim9x_x1", "js_m_fa18_aim9x_x1","js_m_fa18_Maverick_x1","js_m_fa18_Maverick_x1","js_m_fa18_bombrack_x1","js_m_fa18_bombrack_x1", "js_m_fa18_bombrack_x1", "js_m_fa18_bombrack_x1", "js_m_fa18_aim120c_x1", "js_m_fa18_aim120c_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_Maverick_x1", "js_m_fa18_Maverick_x1", "js_m_fa18_Maverick_x1", "js_m_fa18_Maverick_x1","js_m_fa18_wing_tank_x1"] execvm "js_fa18\scripts\FA18_dynamic_loadouts.sqf";" $capLoadout = "fa18_dynamic_loadoutscript = [_FA18, "js_m_fa18_aim9x_x1", "js_m_fa18_aim9x_x1","js_m_fa18_aim9x_x1","js_m_fa18_aim9x_x1","js_m_fa18_aim120c_x1","js_m_fa18_aim120c_x1", "js_m_fa18_wing_tank_x1", "js_m_fa18_wing_tank_x1", "js_m_fa18_aim120c_x1", "js_m_fa18_aim120c_x1", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty","js_m_fa18_wing_tank_x1"] execvm "js_fa18\scripts\FA18_dynamic_loadouts.sqf";" $defaultLoadout = 2; // CAS Loadout if ($defaultLoadout == 0) { Change unit init field to: "$emptyLoadout"; } elseif ($defaultLoadout == 1) { Change unit init field to: "$multiroleLoadout"; } elseif ($defaultLoadout == 2) { Change unit init field to: "$casLoadout"; } elseif ($defaultLoadout == 3) { Change unit init field to: "$capLoadout"; } else { Change unit init field to: "$emptyLoadout"; } What I don't know how to do is the "Change unit init field to:" code. How do I do this? Thanks, PTW-105 Share this post Link to post Share on other sites
shuko 59 Posted October 13, 2013 (edited) Thats not SQF syntax though. defaultLoadout = paramsArray select 0; enableRespawn = paramsArray select 1; _fa18loadouts = [ ["js_m_fa18_aim9x_x1","js_m_fa18_bombrack_x1","js_m_fa18_aim120c_x1"], ["js_m_fa18_aim9x_x1","js_m_fa18_bombrack_x1","js_m_fa18_aim120c_x1"], ["js_m_fa18_aim9x_x1","js_m_fa18_bombrack_x1","js_m_fa18_aim120c_x1"], ["js_m_fa18_aim9x_x1","js_m_fa18_bombrack_x1","js_m_fa18_aim120c_x1"] ]; [planeName,(_fa18loadouts select defaultLoadout)] execvm "js_fa18\scripts\FA18_dynamic_loadouts.sqf"; Obviously, you need to change the loadouts.sqf a bit. Oh and, technically you are not changing the init field of the plane, but rather removing and adding weapons and ammo. Edited October 13, 2013 by Shuko Share this post Link to post Share on other sites
PTW-105 10 Posted October 13, 2013 Shuko, Where do I put that code? In a new loadouts.sqf, description.ext, or init.sqf? How do I build the multiple loadouts, copy the _fa18loadouts = []? This is the first time I've dealt with external SQF files. Thanks, PTW-105 Share this post Link to post Share on other sites
shuko 59 Posted October 14, 2013 So, the FA18_dynamic_loadouts.sqf is not your's, but some addon's file? Does it actually take the loadout as multiple parameters instead of a single array? Could you paste the file? The code above goes into init.sqf and each line/member of the _fa18loadouts array is one loadout (you just need to change them so they include the correct weapons and ammo). Player will selected parameter, the paramLoadout variable will contain a number from 0 to 4. You just use that number to select the specific array member from the loadout array. Anyway, please, show us the code in the js_fa18\scripts\FA18_dynamic_loadouts.sqf so we know what parameters it takes. Share this post Link to post Share on other sites
PTW-105 10 Posted October 14, 2013 No, the SQF files referenced aren't mine. Looking through the unpacked mod, it look like the only SQF file included with the mod is FA18_instant_loadouts.sqf. I see what may be the concern that the file referenced isn't what exists. It looks like after some handoffs of the project, names and structures of files have changed, and may not be exactly what is listed in the user manual or documentation. Anyways, here's the instant_loadouts.sqf file: //dynamic loadout selection/rearming script for FA18 E/F //created by John_Spartan //to execute use followning examples for various weapon presets, call this script via unit init line in editor or via instance of mission script // //fa18loadoutscript = [this,_station_1,_station_2,_station_3,_station_4,_station_5,_station_6,_station_7,_station_8,_station_9,_station_10,_station_11,_station_12,_station_13,_station_14,_station_15,_station_16,_station_17,_station_18,_station_19] execvm "js_jc_fa18\scripts\LOADOUTS\FA18_instant_loadouts.sqf"; //MR: fa18_dynamic_loadoutscript = [_FA18, "js_m_fa18_aim9x_x1", "js_m_fa18_aim9x_x1","js_m_fa18_aim120c_x1","js_m_fa18_aim120c_x1","js_m_fa18_aim120c_x1","js_m_fa18_aim120c_x1", "js_m_fa18_bombrack_x1", "js_m_fa18_bombrack_x1", "js_m_fa18_aim120c_x1", "js_m_fa18_aim120c_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty","js_m_fa18_wing_tank_x1"] execvm "js_fa18\scripts\FA18_dynamic_loadouts.sqf"; //CAS; fa18_dynamic_loadoutscript = [_FA18, "js_m_fa18_aim9x_x1", "js_m_fa18_aim9x_x1","js_m_fa18_Maverick_x1","js_m_fa18_Maverick_x1","js_m_fa18_bombrack_x1","js_m_fa18_bombrack_x1", "js_m_fa18_bombrack_x1", "js_m_fa18_bombrack_x1", "js_m_fa18_aim120c_x1", "js_m_fa18_aim120c_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_Maverick_x1", "js_m_fa18_Maverick_x1", "js_m_fa18_Maverick_x1", "js_m_fa18_Maverick_x1","js_m_fa18_wing_tank_x1"] execvm "js_fa18\scripts\FA18_dynamic_loadouts.sqf"; //CAP: fa18_dynamic_loadoutscript = [_FA18, "js_m_fa18_aim9x_x1", "js_m_fa18_aim9x_x1","js_m_fa18_aim9x_x1","js_m_fa18_aim9x_x1","js_m_fa18_aim120c_x1","js_m_fa18_aim120c_x1", "js_m_fa18_wing_tank_x1", "js_m_fa18_wing_tank_x1", "js_m_fa18_aim120c_x1", "js_m_fa18_aim120c_x1", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty","js_m_fa18_wing_tank_x1"] execvm "js_fa18\scripts\FA18_dynamic_loadouts.sqf"; //F TANKER: fa18_dynamic_loadoutscript = [_FA18, "js_m_fa18_aim9x_x1", "js_m_fa18_aim9x_x1","js_m_fa18_aim9x_x1","js_m_fa18_aim9x_x1","js_m_fa18_wing_tank_x1","js_m_fa18_wing_tank_x1", "js_m_fa18_wing_tank_x1", "js_m_fa18_wing_tank_x1", "js_m_fa18_aim120c_x1", "js_m_fa18_altflir_pod_x1", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty","js_m_fa18_buddypod_x1"] execvm "js_fa18\scripts\FA18_dynamic_loadouts.sqf"; _FA18 = _this select 0; //name of the unit we are playing with _FA18 selectWeapon "js_w_master_arms_safe"; _FA18 animate ["rearming_done_switch",0]; _station_1 = _this select 1; _station_2 = _this select 2; _station_3 = _this select 3; _station_4 = _this select 4; _station_5 = _this select 5; _station_6 = _this select 6; _station_7 = _this select 7; _station_8 = _this select 8; _station_9 = _this select 9; _station_10 = _this select 10; _station_11 = _this select 11; _station_12 = _this select 12; _station_13 = _this select 13; _station_14 = _this select 14; _station_15 = _this select 15; _station_16 = _this select 16; _station_17 = _this select 17; _station_18 = _this select 18; _station_19 = _this select 19; //remove any default loadout weapons and magazines first _fa18 removeWeapon "js_w_fa18_aim9xLaucher"; _fa18 removeWeapon "js_w_fa18_aim120cLaucher"; _fa18 removeWeapon "js_w_fa18_GBU12LGBLaucher"; _fa18 removeWeapon "js_w_fa18_Mk82BombLauncher"; _fa18 removeWeapon "js_w_fa18_MaverickLauncher"; _fa18 removeWeapon "js_w_fa18_fueltank_holder"; _fa18 removeWeapon "js_w_fa18_HarpoonLauncher"; _fa18 removeWeapon "js_w_fa18_GBU31BombLauncher"; _fa18 removeWeapon "js_w_fa18_GBU32BombLauncher"; _fa18 removeWeapon "js_w_fa18_GBU38BombLauncher"; _fa18 removeWeapon "Laserdesignator_mounted"; _fa18 removeMagazines "js_m_fa18_aim9x_x1"; _fa18 removeMagazines "js_m_fa18_aim120c_x1"; _fa18 removeMagazines "js_m_fa18_bombrack_x1"; _fa18 removeMagazines "js_m_fa18_GBU12_x1"; _fa18 removeMagazines "js_m_fa18_MK82_x1"; _fa18 removeMagazines "js_m_fa18_GBU38_JDAM_x1"; _fa18 removeMagazines "js_m_fa18_GBU32_JDAM_x1"; _fa18 removeMagazines "js_m_fa18_GBU31_JDAM_x1"; _fa18 removeMagazines "js_m_fa18_Maverick_x1"; _fa18 removeMagazines "js_m_fa18_Harpoon_x1"; _fa18 removeMagazines "js_m_fa18_wing_tank_x1"; _fa18 removeMagazines "js_m_fa18_altflir_pod_x1"; _fa18 removeMagazines "js_m_fa18_empty"; _fa18 removeMagazines "js_m_fa18_fake_empty"; _fa18 removeMagazines "js_m_fa18_buddypod_x1"; _fa18 removeMagazines "Laserbatteries"; //add new magazines first and in right sequence so the proxies are loaded properly for specified loadout _FA18 addMagazine _station_1; _FA18 addMagazine _station_2; _FA18 addMagazine _station_3; _FA18 addMagazine _station_4; _FA18 addMagazine _station_5; _FA18 addMagazine _station_6; _FA18 addMagazine _station_7; _FA18 addMagazine _station_8; _FA18 addMagazine _station_9; _FA18 addMagazine _station_10; _FA18 addMagazine _station_11; _FA18 addMagazine _station_12; _FA18 addMagazine _station_13; _FA18 addMagazine _station_14; _FA18 addMagazine _station_15; _FA18 addMagazine _station_16; _FA18 addMagazine _station_17; _FA18 addMagazine _station_18; _FA18 addMagazine _station_19; //add new weapons depending on selected loadout _loadout = magazines _FA18; sleep 0.5; if (("js_m_fa18_aim9x_x1" in _loadout)) then {_FA18 addWeapon "js_w_fa18_aim9xLaucher";}; if (("js_m_fa18_aim120c_x1" in _loadout)) then {_FA18 addWeapon "js_w_fa18_aim120cLaucher";}; if (("js_m_fa18_GBU12_x1" in _loadout)) then {_FA18 addWeapon "js_w_fa18_GBU12LGBLaucher";}; if (("js_m_fa18_MK82_x1" in _loadout)) then {_FA18 addWeapon "js_w_fa18_Mk82BombLauncher";}; if (("js_m_fa18_GBU38_JDAM_x1" in _loadout)) then {_FA18 addWeapon "js_w_fa18_GBU38BombLauncher";}; if (("js_m_fa18_GBU32_JDAM_x1" in _loadout)) then {_FA18 addWeapon "js_w_fa18_GBU32BombLauncher";}; if (("js_m_fa18_GBU31_JDAM_x1" in _loadout)) then {_FA18 addWeapon "js_w_fa18_GBU31BombLauncher";}; if (("js_m_fa18_Maverick_x1" in _loadout)) then {_FA18 addWeapon "js_w_fa18_MaverickLauncher";}; if (("js_m_fa18_Harpoon_x1" in _loadout)) then {_FA18 addWeapon "js_w_fa18_HarpoonLauncher";}; if (("js_m_fa18_wing_tank_x1" in _loadout)) then {_FA18 addWeapon "js_w_fa18_fueltank_holder";}; if (("js_m_fa18_altflir_pod_x1" in _loadout)) then {_FA18 addWeapon "Laserdesignator_mounted"; _FA18 addMagazine "Laserbatteries"}; _FA18 setVehicleAmmo 1; _Fuel_tank_count = {_x == "js_m_fa18_wing_tank_x1"} count magazines _FA18; If (_Fuel_tank_count < 1) Then { _External_fuel = _FA18 animationPhase "auxtank_switch"; _FA18 animate ["auxtank_switch",0]; }; If (_Fuel_tank_count == 1) Then { _External_fuel = _FA18 animationPhase "auxtank_switch"; If ((_External_fuel < 0.2)) Then { _FA18 animate ["auxtank_switch",(_External_fuel + (0.2 - _External_fuel))]; }; If ((_External_fuel > 0.2)) Then { _FA18 animate ["auxtank_switch",0.2]; }; }; If (_Fuel_tank_count == 2) Then { _External_fuel = _FA18 animationPhase "auxtank_switch"; If ((_External_fuel < 0.4)) Then { _FA18 animate ["auxtank_switch",(_External_fuel + (0.4 - _External_fuel))]; }; If ((_External_fuel > 0.4)) Then { _FA18 animate ["auxtank_switch",0.4]; }; }; If (_Fuel_tank_count == 3) Then { _External_fuel = _FA18 animationPhase "auxtank_switch"; If ((_External_fuel < 0.6)) Then { _FA18 animate ["auxtank_switch",(_External_fuel + (0.6 - _External_fuel))]; }; If ((_External_fuel > 0.6)) Then { _FA18 animate ["auxtank_switch",0.6]; }; }; If (_Fuel_tank_count == 4) Then { _External_fuel = _FA18 animationPhase "auxtank_switch"; If ((_External_fuel < 0.8)) Then { _FA18 animate ["auxtank_switch",(_External_fuel + (0.8 - _External_fuel))]; }; If ((_External_fuel > 0.8)) Then { _FA18 animate ["auxtank_switch",0.8]; }; }; If (_Fuel_tank_count == 5) Then { _External_fuel = _FA18 animationPhase "auxtank_switch"; If ((_External_fuel < 0.99)) Then { _FA18 animate ["auxtank_switch",(_External_fuel + (1.0 - _External_fuel))]; }; If ((_External_fuel >= 1.0)) Then { _FA18 animate ["auxtank_switch",1.0]; }; }; sleep 0.05; _External_fuel = _FA18 animationPhase "auxtank_switch"; If (("js_m_fa18_buddypod_x1" in _loadout)) Then { If (_Fuel_tank_count > 1) Then { _FA18 animate ["auxtank_switch",(_External_fuel + 0.2)]; }; If (_Fuel_tank_count < 1) Then { _FA18 animate ["auxtank_switch",0.2]; }; }; _FA18 selectWeapon "js_w_master_arms_safe"; _FA18 animate ["rearming_done_switch",1]; Exit; The mod I'm working with can be found here (v1.2 at time of writing): http://forums.bistudio.com/showthread.php?164308-F-A-18-Super-Hornet-for-ARMA-3 Page 11 of the user manual says this (along with a different copy of the script that is found in the instant_loadouts.sqf file posted above): To enable custom loadout in mission start-up please use following code in units init field:fa18_dynamic_loadoutscript = [this, "js_m_fa18_aim9x_x1", "js_m_fa18_aim9x_x1","js_m_fa18_aim120c_x1","js_m_fa18_aim120c_x1","js_m_fa18_aim120 c_x1","js_m_fa18_aim120c_x1", "js_m_fa18_bombrack_x1", "js_m_fa18_bombrack_x1", "js_m_fa18_aim120c_x1", "js_m_fa18_aim120c_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_GBU12_x1", " js_m_fa18_GBU12_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty","js_m_fa18_wing_tank_x1"] execvm "js_jc_fa18\scripts\LOADOUTS\FA18_instant_loadouts.sqf"; This is a sample initialization line to call FA18_instant_loadouts.sqf script on mission start-up. Idea is to pass 20 variables to the script [unit we are rearming, and 19 magazine clasnames – one for each station] like in example below fa18loadoutscript = [my_FA18,_station_1,_station_2,_station_3,_station_4,_station_5,_station_6,_station_7,_stati on_8,_station_9,_station_10,_station_11,_station_12,_station_13,_station_14,_station_15,_st ation_16,_station_17,_station_18,_station_19] execvm "js_jc_fa18\scripts\LOADOUTS\FA18_instant_loadouts.sqf"; Please see all the weapons clasnames built in with this aircraft to have your preferred combination/loadout. Also there is a image with all the weapons proxy numbers below to make it easier to understand weapons layout on model. Sample of FA18_instant_loadouts.sqf is included in this download, so theoretically mission designer can customize this script and add any weapons from our missilebox or any other mod on these FA- 18’s. Thanks for everyone's help so far, PTW-105 Share this post Link to post Share on other sites
shuko 59 Posted October 14, 2013 defaultLoadout = paramsArray select 0; enableRespawn = paramsArray select 1; _loadout = switch defaultLoadout do { case 0: { // empty [_FA18, "js_m_fa18_empty", "js_m_fa18_empty","js_m_fa18_empty","js_m_fa18_empty","js_m_fa18_empty","js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty","js_m_fa18_empty","js_m_fa18_empty","js_m_fa18_empty","js_m_fa18_empty","js_m_fa18_empty","js_m_fa18_empty","js_m_fa18_empty","js_m_fa18_empty","js_m_fa18_empty"] }; case 1: { //multirole [_FA18, "js_m_fa18_aim9x_x1", "js_m_fa18_aim9x_x1","js_m_fa18_aim120c_x1","js_m_fa18_aim120c_x1","js_m_fa18_aim120c_x1","js_m_fa18_aim120c_x1", "js_m_fa18_bombrack_x1", "js_m_fa18_bombrack_x1", "js_m_fa18_aim120c_x1", "js_m_fa18_aim120c_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty","js_m_fa18_wing_tank_x1"] }; case 2: { // CAS [_FA18, "js_m_fa18_aim9x_x1", "js_m_fa18_aim9x_x1","js_m_fa18_Maverick_x1","js_m_fa18_Maverick_x1","js_m_fa18_bombrack_x1","js_m_fa18_bombrack_x1", "js_m_fa18_bombrack_x1", "js_m_fa18_bombrack_x1", "js_m_fa18_aim120c_x1", "js_m_fa18_aim120c_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_GBU12_x1", "js_m_fa18_Maverick_x1", "js_m_fa18_Maverick_x1", "js_m_fa18_Maverick_x1", "js_m_fa18_Maverick_x1","js_m_fa18_wing_tank_x1"] }; case 3: { // cap [_FA18, "js_m_fa18_aim9x_x1", "js_m_fa18_aim9x_x1","js_m_fa18_aim9x_x1","js_m_fa18_aim9x_x1","js_m_fa18_aim120c_x1","js_m_fa18_aim120c_x1", "js_m_fa18_wing_tank_x1", "js_m_fa18_wing_tank_x1", "js_m_fa18_aim120c_x1", "js_m_fa18_aim120c_x1", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty", "js_m_fa18_empty","js_m_fa18_wing_tank_x1"] }; }; _loadout execvm "js_fa18\scripts\FA18_dynamic_loadouts.sqf"; Share this post Link to post Share on other sites
PTW-105 10 Posted October 14, 2013 I put this in my init.sqf file. Now I need to place the FA18_dynamic_loadouts.sqf file in %missiondir%\js_fa18\scripts\FA18_dynamic_loadouts.sqf. Is it safe to change this code in the init.sqf to eliminate excess folder depth and to point to %missiondir%/js_fa18/scripts/FA18_dynamic_loadouts.sqf? Share this post Link to post Share on other sites
shuko 59 Posted October 14, 2013 At quick glance, it seems like a standalone script so you could place it into the mission folder. Share this post Link to post Share on other sites
John Spartan 89 Posted October 14, 2013 @PTW-105, the script you are looking at is designed to have a "freely" chosen load out in mission start-up for user. Idea is that mission designer uses this script and then also parks HEMTT reammo truck near the FA18 so the player can customize his aircraft load out thru service menu. Script needs to be called by passing 20 parameters [plane name + 19 weapon magazine names]. Script normaly can be called vie init sqf or via trigger or init line of the plane itself. For what you are trying to archive I recommend setting up a pram's as you normally do and then add case/switch where you execute this script. Share this post Link to post Share on other sites