Xean835 10 Posted December 11, 2014 (edited) Hey guys, iam absolutly new in creating some scripts... and dont understand anything. But ill please you for something. Iam creating a Multiplayer Mission for the standard version of ArmA 3 and my Focus is, that its a Gamemod like Battlefield 2s Strike at Karkant! I need a LoadOut System and i Please you 4 that. Here is my idea: I will place an empty box. When you go close to that Box youll have the Option to scoll down and select the Option "LoadOut". If you hit that, a Menu pops up like the one in BF2. 7 Big Buttons and a preview for the load out appears. You can switch the main weapons and Items of each class. Here is my idea: NATO and/or OPFOR: Class 1: Special Forces swichable 5.5mm Nato and 6.5mm Mainweapon with switchable Optics and switchable Suppressor and 6 mags, 1 C4 explosive, Handgun with 3 mags, 4 explosive grenades, 2 Smoke Grenades, TecticalVest, 2 firstaidkits,Nightvision, Map, GPS, Radio, Kompass, smallBackpack, switchable Uniform , Headgear and glasses. Class2: Sniper switchable 6.5mm and 7.62mm SniperRifle with switchable Optics and 6 mags, 2 Claymores, Silenced Handgun with 3 mags, Rangefinder, Ghillysuit, 2 firstaidkits, 2 HE_Handgenades,Nightvision, Map, UAVTerminal, Radio, Kompass, smallBackpack,tecticalvest. Class3: Assault Switchable 6.5mm Assaultweapon with GranadeLauncher, switchable Optics, 6mags, 3 HE LauncherGrenades, 2 SmokeLauncherGranades, TecticalVest, 2 firstaidkits, Nightvision, Map, GPS, Radio, Kompass, smallBackpack, Handgun switchable with 3 mags, switchable Uniform , Headgear and glasses. Class4: Support Switchable 5.5mm, 6.5mm and 7.62mm LMG Weapons, switchable Optics, 4 mags, 1 dropable Ammobox with 2mags of each magclass, 2 HE_HandGrenades, Tecticalvest, 2 firstaidkits,Nightvision, Map, GPS, Radio, Kompass, smallBackpack, switchable Uniform , Headgear and glasses. Class5: Engineer Switchable 9mm and 5.5mm SMGs, switchable Optics, 6mags,Handgun with 3 mags, 2 AT mines, 2 Toolkits, 2HE_handgrenades, TecticalVest, 2 firstaidkits, Nightvision, Map, GPS, Radio, Kompass, Backpack, switchable Uniform , Headgear and glasses. Class6: Medic Switchable 5.5mm and 6.5mm AssaultWeapon, Switchable Optics, Option to revive People ( maybe an insertion of an extern script ) 2 Medickits, 8 Firstaidkits, 6 mags, 2 HE_handgrenades, Handgun with 3 mags, TecticalVest,Nightvision, Map, GPS, Radio, Kompass, Backpack, switchable Uniform , Headgear and glasses. Class7: Anti-Tank Switchable 9mm and 5.5mm SMG-Mainweapon, switchable Optics, 6mags,Handgun with 3 mags, switchable AT Launcher without Titan and an ammocount of 3,TecticalVest, 2 firstaidkits, Nightvision, Map, GPS, Radio, Kompass, Backpack, switchable Uniform , Headgear and glasses. It would be Awesome if the LoadOut between Nato and OPFOR looks different. second time the idea ingame: here a Picture: I will scoll at a gear box and there have to be a button, "Loadout". If you hit the button the Menu pops up and the 7 classes with switchable buttons and a Loadout preview appears, maybe with a live view of Changeing. At the End you have to Klick a "Finish-Button" and the loadout will load. Than you are gtg. i hope you guys can help me and make a nice scripte 4 every one. Greetings,:cool: Xean ______________________________________________________________________________________________________________________________________________________________________ Edit1: Here is an idea how to realize my problem. I have found the LEA editor for Arma 3. Its an easy way to creat some loadout stuff. If someone can change the script, that you only can use the "LoadOut"-Option ingame by scrollin near to a "Box" would be awesome! Edited December 11, 2014 by Xean835 Share this post Link to post Share on other sites
Redphoenix 1540 Posted December 11, 2014 IT's pretty much possible, I've done that for my Urban TDM mission. At first, you need a loadout.hpp were you define the loadouts. Here's a template you can use. class WEST1 { displayName = "Silenced Pistol"; // Name visible in the menu icon = "ui\pistol.paa"; // Icon displayed next to the name // Loadout definition, uses same entries as CfgVehicles classes weapons[] = { "hgun_Pistol_heavy_01_snds_F" }; magazines[] = { "11Rnd_45ACP_Mag", "11Rnd_45ACP_Mag", "11Rnd_45ACP_Mag", "11Rnd_45ACP_Mag", "11Rnd_45ACP_Mag", "11Rnd_45ACP_Mag", "11Rnd_45ACP_Mag", "11Rnd_45ACP_Mag", "11Rnd_45ACP_Mag", "Chemlight_blue", "Chemlight_blue", "SmokeShell", "SmokeShell", "MiniGrenade", "MiniGrenade" }; items[] = { "FirstAidKit" }; linkedItems[] = { "G_Goggles_VR", "optic_MRD" }; uniformClass = "U_B_Protagonist_VR"; }; class WEST2 { displayName = "Submachine Gun"; // Name visible in the menu icon = "ui\mp.paa"; // Icon displayed next to the name // Loadout definition, uses same entries as CfgVehicles classes weapons[] = { "hgun_PDW2000_F" }; magazines[] = { "30Rnd_9x21_Mag", "30Rnd_9x21_Mag", "30Rnd_9x21_Mag", "30Rnd_9x21_Mag", "30Rnd_9x21_Mag", "30Rnd_9x21_Mag", "30Rnd_9x21_Mag", "Chemlight_blue", "Chemlight_blue", "SmokeShell", "SmokeShell", "MiniGrenade", "MiniGrenade" }; items[] = { "FirstAidKit" }; linkedItems[] = { "G_Goggles_VR", "optic_ACO_grn" }; uniformClass = "U_B_Protagonist_VR"; }; class WEST3 { displayName = "Assault Rifle"; // Name visible in the menu icon = "ui\ar.paa"; // Icon displayed next to the name // Loadout definition, uses same entries as CfgVehicles classes weapons[] = { "arifle_MXC_Black_F" }; magazines[] = { "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "Chemlight_blue", "Chemlight_blue", "SmokeShell", "SmokeShell", "MiniGrenade", "MiniGrenade" }; items[] = { "FirstAidKit" }; linkedItems[] = { "G_Goggles_VR", "optic_ACO_grn" }; uniformClass = "U_B_Protagonist_VR"; }; class WEST4 { displayName = "Machine Gun"; // Name visible in the menu //icon = "\ui\mg.paa"; // Icon displayed next to the name // Loadout definition, uses same entries as CfgVehicles classes weapons[] = { "arifle_MX_SW_F" }; magazines[] = { "100Rnd_65x39_caseless_mag_Tracer", "100Rnd_65x39_caseless_mag_Tracer", "Chemlight_blue", "Chemlight_blue", "SmokeShell", "SmokeShell", "MiniGrenade", "MiniGrenade" }; items[] = { "FirstAidKit" }; linkedItems[] = { "G_Goggles_VR", "optic_ACO_grn" }; uniformClass = "U_B_Protagonist_VR"; }; class WEST5 { displayName = "Battle Rifle"; // Name visible in the menu //icon = "\ui\mg.paa"; // Icon displayed next to the name // Loadout definition, uses same entries as CfgVehicles classes weapons[] = { "srifle_DMR_01_F" }; magazines[] = { "10Rnd_762x51_Mag", "10Rnd_762x51_Mag", "10Rnd_762x51_Mag", "10Rnd_762x51_Mag", "10Rnd_762x51_Mag", "10Rnd_762x51_Mag", "Chemlight_green", "Chemlight_green", "SmokeShell", "SmokeShell", "MiniGrenade", "MiniGrenade" }; items[] = { "FirstAidKit" }; linkedItems[] = { "G_Goggles_VR", "optic_LRPS" }; uniformClass = "U_B_Protagonist_VR"; }; // Class INDEPENDENT class INDEPENDENT1 { displayName = "Silenced Pistol"; // Name visible in the menu icon = "ui\pistol.paa"; // Icon displayed next to the name // Loadout definition, uses same entries as CfgVehicles classes weapons[] = { "hgun_Pistol_heavy_01_snds_F" }; magazines[] = { "11Rnd_45ACP_Mag", "11Rnd_45ACP_Mag", "11Rnd_45ACP_Mag", "11Rnd_45ACP_Mag", "11Rnd_45ACP_Mag", "11Rnd_45ACP_Mag", "11Rnd_45ACP_Mag", "11Rnd_45ACP_Mag", "11Rnd_45ACP_Mag", "Chemlight_green", "Chemlight_green", "SmokeShell", "SmokeShell", "MiniGrenade", "MiniGrenade" }; items[] = { "FirstAidKit" }; linkedItems[] = { "G_Goggles_VR", "optic_MRD" }; uniformClass = "U_I_Protagonist_VR"; }; class INDEPENDENT2 { displayName = "Submachine Gun"; // Name visible in the menu icon = "ui\mp.paa"; // Icon displayed next to the name // Loadout definition, uses same entries as CfgVehicles classes weapons[] = { "hgun_PDW2000_Holo_F" }; magazines[] = { "30Rnd_9x21_Mag", "30Rnd_9x21_Mag", "30Rnd_9x21_Mag", "30Rnd_9x21_Mag", "30Rnd_9x21_Mag", "Chemlight_green", "Chemlight_green", "SmokeShell", "SmokeShell", "MiniGrenade", "MiniGrenade" }; items[] = { "FirstAidKit" }; linkedItems[] = { "G_Goggles_VR", "optic_ACO_grn" }; uniformClass = "U_I_Protagonist_VR"; }; class INDEPENDENT3 { displayName = "Assault Rifle"; // Name visible in the menu icon = "ui\ar.paa"; // Icon displayed next to the name // Loadout definition, uses same entries as CfgVehicles classes weapons[] = { "arifle_MXC_Black_F" }; magazines[] = { "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag", "Chemlight_green", "Chemlight_green", "SmokeShell", "SmokeShell", "MiniGrenade", "MiniGrenade" }; items[] = { "FirstAidKit" }; linkedItems[] = { "G_Goggles_VR", "optic_ACO_grn" }; uniformClass = "U_I_Protagonist_VR"; }; class INDEPENDENT4 { displayName = "Machine Gun"; // Name visible in the menu //icon = "\ui\mg.paa"; // Icon displayed next to the name // Loadout definition, uses same entries as CfgVehicles classes weapons[] = { "arifle_MX_SW_F" }; magazines[] = { "100Rnd_65x39_caseless_mag_Tracer", "100Rnd_65x39_caseless_mag_Tracer", "Chemlight_green", "Chemlight_green", "SmokeShell", "SmokeShell", "MiniGrenade", "MiniGrenade" }; items[] = { "FirstAidKit" }; linkedItems[] = { "G_Goggles_VR", "optic_ACO_grn" }; uniformClass = "U_I_Protagonist_VR"; }; class INDEPENDENT5 { displayName = "Battle Rifle"; // Name visible in the menu //icon = "\ui\mg.paa"; // Icon displayed next to the name // Loadout definition, uses same entries as CfgVehicles classes weapons[] = { "srifle_DMR_01_F" }; magazines[] = { "10Rnd_762x51_Mag", "10Rnd_762x51_Mag", "10Rnd_762x51_Mag", "10Rnd_762x51_Mag", "10Rnd_762x51_Mag", "10Rnd_762x51_Mag", "Chemlight_green", "Chemlight_green", "SmokeShell", "SmokeShell", "MiniGrenade", "MiniGrenade" }; items[] = { "FirstAidKit" }; linkedItems[] = { "G_Goggles_VR", "optic_LRPS" }; uniformClass = "U_I_Protagonist_VR"; }; When you have that, you need a initServer.sqf were you call a premade BI function. [west, "WEST1"] call BIS_fnc_addRespawnInventory; [west, "WEST2"] call BIS_fnc_addRespawnInventory; [west, "WEST3"] call BIS_fnc_addRespawnInventory; [west, "WEST4"] call BIS_fnc_addRespawnInventory; [west, "WEST5"] call BIS_fnc_addRespawnInventory; [resistance, "INDEPENDENT1"] call BIS_fnc_addRespawnInventory; [resistance, "INDEPENDENT2"] call BIS_fnc_addRespawnInventory; [resistance, "INDEPENDENT3"] call BIS_fnc_addRespawnInventory; [resistance, "INDEPENDENT4"] call BIS_fnc_addRespawnInventory; [resistance, "INDEPENDENT5"] call BIS_fnc_addRespawnInventory; And that's about it I think. You can DL the mission here to see what it looks like: https://dl.dropboxusercontent.com/u/84370332/TDM_CO12_UrbanAreaVR.VR.rar Share this post Link to post Share on other sites
Gunter Severloh 4070 Posted December 11, 2014 Nice idea. If you use VAS -Virtual ammbox system, or Arsenal, you can create custom loadouts, and save them and then reload them, just another idea for you. Share this post Link to post Share on other sites
654wak654 25 Posted December 11, 2014 By the way, Xean had the same post on Armaholic and we're already done. He made the loadouts (With Arsenal from the look of the code) and I prepared everything else. As a small tribute it uses the Battlefield 2 class icons. I'm just looking in to making a outside camera like in his design. Share this post Link to post Share on other sites
Xean835 10 Posted December 12, 2014 Thx guys 4 the good Ideas. i just creat a script request on Armaholic like "654wak654" said. He told me that he is in condition to do this. I just send him my LoadOut Ideas and now we have to wait. Thx 4 that once more! Share this post Link to post Share on other sites
Xean835 10 Posted December 18, 2014 Update Ok guys, ive got some new! i have createt some Loadout stuff, but if i add the action to a table ive got the action all the time and not only at the table or box or what ever... here is some of my script: //Medic.sqf /* Medic LoadOut script This script clears all Items, Weapons, Magazines and Backpacks from the player and adds the Medic LoadOut to the player. */ //Medic LoadOut sleep 1; waitUntil {!isNull player}; _unit = _this select 0; if (local _unit) then { //Remove all items removeuniform _unit; removeallcontainers _unit; removeAllWeapons _unit; removeGoggles _unit; removeHeadgear _unit; removeVest _unit; removeAllAssignedItems _unit; removebackpack _unit; //Add item content to the player //Uniform _unit addUniform "U_B_CTRG_1"; //Headgear _unit addHeadgear "H_HelmetB_light_sand"; //Goggles _unit addGoggles "G_Combat"; //Vest _unit addVest "V_TacVestIR_blk"; //Backpack _unit addBackpack "B_Kitbag_cbr"; //Map,Compass,Watch,Radio,GPS _unit linkItem "ItemMap"; _unit linkItem "ItemCompass"; _unit linkItem "ItemWatch"; _unit linkItem "ItemRadio"; _unit linkItem "ItemGPS"; //Add Weapon content to the player //Magazine for pistol and rifle _unit addMagazine "9Rnd_45ACP_Mag"; _unit addMagazine "30Rnd_65x39_caseless_mag"; //Primary weapon and optics/suppressor _unit addWeapon "arifle_MX_F"; _unit addPrimaryWeaponItem "optic_Hamr"; //Secondary weapon and optics/suppressor _unit addWeapon "hgun_ACPC2_F"; //FirstAidKit _unit addItem "FirstAidKit"; _unit addItem "FirstAidKit"; //Add pistol magazines _unit addMagazine "9Rnd_45ACP_Mag"; _unit addMagazine "9Rnd_45ACP_Mag"; //Add rifle magazines _unit addMagazine "30Rnd_65x39_caseless_mag"; _unit addMagazine "30Rnd_65x39_caseless_mag"; _unit addMagazine "30Rnd_65x39_caseless_mag"; _unit addMagazine "30Rnd_65x39_caseless_mag"; _unit addMagazine "30Rnd_65x39_caseless_mag"; //Grenades _unit addMagazine "HandGrenade"; _unit addMagazine "HandGrenade"; _unit addMagazine "SmokeShell"; _unit addMagazine "SmokeShell"; //Special things _unit addItem "MediKit"; _unit addItem "FirstAidKit"; _unit addItem "FirstAidKit"; _unit addItem "FirstAidKit"; _unit addItem "FirstAidKit"; _unit addItem "FirstAidKit"; _unit addItem "FirstAidKit"; _unit addItem "FirstAidKit"; _unit addItem "FirstAidKit"; }; if(true) exitWith{}; //init.sqf []execVM ["Medic.sqf"]; //initline ingame: player addAction ["Medic","Medic.sqf"]; // Help: I hope you can help me: i just want to add that action only by looking to that box and not all the time Share this post Link to post Share on other sites
kbbw123 115 Posted December 18, 2014 name the box _AMMO by example and make it _AMMO addAction ["Medic","Medic.sqf"]; at the moment you are giving the player the addaction Share this post Link to post Share on other sites
Xean835 10 Posted December 18, 2014 name the box _AMMO by example and make it _AMMO addAction ["Medic","Medic.sqf"];at the moment you are giving the player the addaction THX MATE but i ve found a better solution to add the Action only in a trigger zone! here is the idea: //playerinit: _actionId = this addAction ["Medic", "Medic.sqf", [], 1, false, true, "", "driver player == player and _target in list Loadout1"]; //trigger: activation: BLUFOR/OPFOR/etc, repeatedly and present Name: Loadout1/Loadoutx/... Share this post Link to post Share on other sites
kbbw123 115 Posted December 18, 2014 thats also possible but than you have to make sure it onl works on the local player in the trigger. i did this myself before aswel but it transmitted it toevery player ingame giving people in the AO the abilety to open any ammobox/loadout system. Share this post Link to post Share on other sites
Xean835 10 Posted December 18, 2014 Ah ok i understand thx bro, ill fig it out ---------- Post added at 12:22 ---------- Previous post was at 12:10 ---------- hmm i cant find the error... pl help Box: Land_PaperBox_open_full_F Name: box1_AMMO init: box1_AMMO addAction ["Medic","Medic.sqf"]; the action menu apears but if i click nothing happens Share this post Link to post Share on other sites
Xean835 10 Posted December 19, 2014 did anyone has n idea whats going wrong with my script? ---------- Post added at 16:14 ---------- Previous post was at 16:05 ---------- Hmm i added the stuff that i posted further but as "KBBW123" said you can change the gear of every person in the zone in multiplayer... I cant add the action to a box... nothing happens... Share this post Link to post Share on other sites