Zakuaz 195 Posted July 3, 2019 I am familiar with the "this addMagazineTurret ["140Rnd_30mm_MP_shells_Tracer_Green",[1,2]];" and placing it in a vehicles init field. But I want to add that plus a few boxes of the other 30mm AP rounds "60Rnd_30mm_APFSDS_shells_Tracer_Green" as well... so far my hack job attempts have failed. Can anyone show me how that line of code should look to enable multiple boxes of two different types of ammo? Share this post Link to post Share on other sites
pierremgi 4890 Posted July 3, 2019 0 = { this addMagazineTurret ["60Rnd_30mm_APFSDS_shells_Tracer_Green",[0]] } count [1,2]; // check for the right turret [0] or else... I don't know your vehicle. 2 Share this post Link to post Share on other sites
Zakuaz 195 Posted July 4, 2019 The vehicle is the Kamysh. Oh my example was bad to begin with sorry about that, {this addMagazineTurret ["140Rnd_30mm_MP_shells_Tracer_Green",[0]]} foreach [1,2] I had tried a cold guess with {this addMagazineTurret ["140Rnd_30mm_MP_shells_Tracer_Green","60Rnd_30mm_APFSDS_shells_Tracer_Green",[0]]} foreach [1,2] but that didnt do anything, imagine that haha. Share this post Link to post Share on other sites
Sgt. Dennenboom 98 Posted July 4, 2019 {this addMagazineTurret ["140Rnd_30mm_MP_shells_Tracer_Green",[0]];} forEach [1,2]; {this addMagazineTurret ["60Rnd_30mm_APFSDS_shells_Tracer_Green",[0]];} forEach [1,2,3,4]; Adds 2 magazines of MP ammo and 4 magazines of APFSDS ammo to the main turret 1 Share this post Link to post Share on other sites
Zakuaz 195 Posted July 4, 2019 Literally that straight forward eh? Seems like I tried that BUT I probably had something wrong in it. Thanks Sgt, I'll give it a go! Share this post Link to post Share on other sites
pierremgi 4890 Posted July 4, 2019 You just have to follow the syntax and not improvise some array where string is mandatory. 1 Share this post Link to post Share on other sites
JIMMI DEE BILLY BOB 4 Posted November 9, 2022 On 7/3/2019 at 10:04 PM, pierremgi said: 0 = { this addMagazineTurret ["60Rnd_30mm_APFSDS_shells_Tracer_Green",[0]] } count [1,2]; // check for the right turret [0] or else... I don't know your vehicle. How do i use this in a sqf.file? Dear pierremgi 🍀 0 = { this addMagazineTurret ["12Rnd_230mm_rockets",[0]] } count [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,60]; my sqf.file The problem //???? Czamak1.sqf if (!isServer) exitWith {}; _veh = _this #0; _veh addEventHandler ["Fired", {_this execVM "trackShell.sqf";}]; _veh = _this #0; _veh setObjectTextureGlobal [0,'\A3\soft_f_beta\Truck_02\Data\Truck_02_kab_OPFOR_co.paa']; _veh = _this #0; _veh setObjectTextureGlobal [2,'\A3\Static_F_Sams\Radar_System_02\Data\Radar_system_02_mat_02_CO.paa']; //???? 0 = { this addMagazineTurret ["12Rnd_230mm_rockets",[0]] } count [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,60]; _veh = _this #0; _veh allowCrewInImmobile true; I use a jebus respawn script. vehicle init. 0 = [this,"DELAY=",1800, "INIT=", "[vehicle _proxyThis] execVM 'Czamak1.sqf' "] spawn jebus_fnc_main; You've helped me before, so you're a natural victim 🤩 Share this post Link to post Share on other sites
Harzach 2517 Posted November 10, 2022 You only need to define "_veh" once. "_veh" is the variable used to reference the vehicle. //Czamak1.sqf if (!isServer) exitWith {}; _veh = _this #0; _veh addEventHandler ["Fired", {_this execVM "trackShell.sqf";}]; _veh setObjectTextureGlobal [0,'\A3\soft_f_beta\Truck_02\Data\Truck_02_kab_OPFOR_co.paa']; _veh setObjectTextureGlobal [2,'\A3\Static_F_Sams\Radar_System_02\Data\Radar_system_02_mat_02_CO.paa']; _veh allowCrewInImmobile true; { _veh addMagazineTurret ["12Rnd_230mm_rockets",[0]] } count [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,60]; Much easier to write: //Czamak1.sqf if (!isServer) exitWith {}; _veh = _this #0; _veh addEventHandler ["Fired", {_this execVM "trackShell.sqf";}]; _veh setObjectTextureGlobal [0,'\A3\soft_f_beta\Truck_02\Data\Truck_02_kab_OPFOR_co.paa']; _veh setObjectTextureGlobal [2,'\A3\Static_F_Sams\Radar_System_02\Data\Radar_system_02_mat_02_CO.paa']; _veh allowCrewInImmobile true; for "_i" from 1 to 60 do {_veh addMagazineTurret ["12Rnd_230mm_rockets",[0]]}; 1 Share this post Link to post Share on other sites
JIMMI DEE BILLY BOB 4 Posted November 10, 2022 18 hours ago, Harzach said: You only need to define "_veh" once. "_veh" is the variable used to reference the vehicle. //Czamak1.sqf if (!isServer) exitWith {}; _veh = _this #0; _veh addEventHandler ["Fired", {_this execVM "trackShell.sqf";}]; _veh setObjectTextureGlobal [0,'\A3\soft_f_beta\Truck_02\Data\Truck_02_kab_OPFOR_co.paa']; _veh setObjectTextureGlobal [2,'\A3\Static_F_Sams\Radar_System_02\Data\Radar_system_02_mat_02_CO.paa']; _veh allowCrewInImmobile true; { _veh addMagazineTurret ["12Rnd_230mm_rockets",[0]] } count [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,60]; Much easier to write: //Czamak1.sqf if (!isServer) exitWith {}; _veh = _this #0; _veh addEventHandler ["Fired", {_this execVM "trackShell.sqf";}]; _veh setObjectTextureGlobal [0,'\A3\soft_f_beta\Truck_02\Data\Truck_02_kab_OPFOR_co.paa']; _veh setObjectTextureGlobal [2,'\A3\Static_F_Sams\Radar_System_02\Data\Radar_system_02_mat_02_CO.paa']; _veh allowCrewInImmobile true; for "_i" from 1 to 60 do {_veh addMagazineTurret ["12Rnd_230mm_rockets",[0]]}; thank you, I don't know what I'm doing, I only write in here when I'm desperate, I'm just picking parts out of people's script and being hopeful 😄 but the Much easier to write dont work, but the first one does. Share this post Link to post Share on other sites