unParking problem (loadouts)

unParking problem (loadouts)

« posted: Oct 30, 2019, 04:06 PM »
Hello gentlemens

I tried to create custom loadout which allow pilot in Kajman/Blackfoot to use weapons.
When you buy chopper loadouts work as they should work, even rearming, but after i will park them to garage, unload them again, pilot lose his ability to control that guns. (In _customCode)

Loadout:
                case "antiTanks":
                {
                    _customCode =
                    {

                       _veh setPylonLoadOut [1, "PylonRack_20Rnd_Rocket_03_AP_F"];
                       _veh setPylonLoadOut [4, "PylonRack_20Rnd_Rocket_03_AP_F"];
                       _veh setPylonLoadOut [2, "PylonRack_1Rnd_Missile_AGM_01_F"];
                       _veh setPylonLoadOut [3, "PylonRack_1Rnd_Missile_AGM_01_F"];
                    };

                    _weapons =
                    [
                        ["gatling_30mm",[0]],
                        ["Laserdesignator_pilotCamera",[-1]],
                        ["Rocket_03_AP_Plane_CAS_02_F",[-1]],
                        ["Missile_AGM_01_Plane_CAS_02_F",[-1]]
                    ];
                    _mags =
                    [
                        ["PylonRack_1Rnd_Missile_AGM_01_F", [-1]],
                        ["PylonRack_1Rnd_Missile_AGM_01_F", [-1]],
                        ["168Rnd_CMFlare_Chaff_Magazine", [-1]],
                        ["Laserbatteries", [-1]]

                    ];

                    _pylons  = ["","","",""];
                };

_custom Code is not loaded for some reason, when i unload vehicle from garage.

And when i try to add this pylon "PylonRack_20Rnd_Rocket_03_AP_F" to _pylons  = ["","","",""];
It means only gunner  can control so gunner have whole pylon but pilot have nothing just empty rockets
beacause if i wanted add amunition to pilot to that pylon I would have to add it into _mags.




Anyone know how to fix that pilot wont lose his ability to use weapons (without selectin "manual fire" in scroll menu)?

Thank for any help
 


Re: unParking problem (loadouts)

« Reply #1 posted: Oct 31, 2019, 04:45 PM »
In this file
"pp_saving_functions.sqf"

There is saving / restore method, what I have to add to save "_customcode"??
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2571

Re: unParking problem (loadouts)

« Reply #2 posted: Oct 31, 2019, 08:46 PM »
First, use this:

Code: [Select]
_customCode =
{
_veh setPylonLoadOut [1, "PylonRack_20Rnd_Rocket_03_AP_F"];
_veh setPylonLoadOut [4, "PylonRack_20Rnd_Rocket_03_AP_F"];
_veh setPylonLoadOut [2, "PylonRack_1Rnd_Missile_AGM_01_F"];
_veh setPylonLoadOut [3, "PylonRack_1Rnd_Missile_AGM_01_F"];
_veh setVariable ["A3W_pylonPaths", [[],[],[],[]]];
};

Then, change this line: https://github.com/A3Wasteland/ArmA3_Wasteland.Altis/blob/7ba008f0482294929779c5a4d34b2bd0e7982f2a/server/functions/fn_getPylonsAmmo.sqf#L13

to

Code: [Select]
private _pylonPaths = _vehicle getVariable ["A3W_pylonPaths", (configProperties [configFile >> "CfgVehicles" >> typeOf _vehicle >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"]) apply {getArray (_x >> "turret")}];

Re: unParking problem (loadouts)

« Reply #3 posted: Nov 03, 2019, 06:38 PM »
Im gonna test that soon, thank you for help Rev.

Re: unParking problem (loadouts)

« Reply #4 posted: Nov 03, 2019, 11:01 PM »
and something similar happening to ůangara Comander version" where i added "CMFlareLauncher_Triples" and "SmokeLauncher" for driver/gunner/comander

    case (_class isKindOf "O_MBT_04_command_F"):
    {

            _weapons =
                            [
                                ["autocannon_30mm_RCWS", [0,0]],
                                ["SmokeLauncher",
  • ],
  • ["SmokeLauncher", [1]],
                                    ["SmokeLauncher",
[0,0]],
                                ["LMG_coax", [-0]],
                                ["cannon_125mm_advanced",
  • ],
  • ["CMFlareLauncher_Triples",
  • ]

                            ];
            _mags =
            [
                ["60Rnd_30mm_MP_shells_Tracer_Green",[0,0]],
                ["60Rnd_30mm_MP_shells_Tracer_Green",[0,0]],
                ["60Rnd_30mm_MP_shells_Tracer_Green",[0,0]],
                ["60Rnd_30mm_MP_shells_Tracer_Green",[0,0]],
                ["1000Rnd_762x51_Belt_Green",[0]],
                ["24Rnd_125mm_APFSDS_T_Green",[0]],
                ["12Rnd_125mm_HEAT_T_Green",[0]],
                ["12Rnd_125mm_HE_T_Green",[0]],
                ["SmokeLauncherMag",[0,0]],
                ["SmokeLauncherMag",[0]],
                ["60Rnd_CMFlareMagazine",[0]],
                ["SmokeLauncherMag",[1]]

            ];

   };

It is have same issue + now commander lose gun + smoke (same problem i have with tigris but only when i try to have 2 types of AA rockets (4x Zephyr and 4x Titan AA))
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2571

Re: unParking problem (loadouts)

« Reply #5 posted: Nov 03, 2019, 11:49 PM »
Never add any SmokeLauncher stuff to paths other than [-1], it's already done automatically.
Never add any CMFlare stuff to any ground vehicle, it's for aircraft only.
Path [1] does not exist on tanks.

Re: unParking problem (loadouts)

« Reply #6 posted: Nov 04, 2019, 12:28 PM »
Thank you very much for explaining Rev. :)