Jump to content
TheoneandonlyNOR

Vehicle inv. copied faction

Recommended Posts

Hello,

 

My Unit wish me to add/edit the Vehicles inventory to have our Unit gear, weapons(included launchers) and Mags.  etc. 

So I am unsure what to do here since our vehicles are copied from another faction(used ALIVE). So do I need to edit the loadout from the original Vehicles or can I do it with the one's we made?

In case either of them. How?

 

I prob. just need an example rest I will probly be able to fix myself.

 

Regards. 

Sorry for my bad English.

Share this post


Link to post
Share on other sites

Do you mean in editor, or in game? When do you need to replace the inventory? (if I understand)

Share this post


Link to post
Share on other sites

I mean script. 

I got all the vehicles that we use in folder. I wish to edit for example CfgVehicles.hpp so that the vehicles has our inventory

 

Yes I need to replace the inventory.

Share this post


Link to post
Share on other sites

This does not look like what I want no. Here is what I have tried so far.

Spoiler

	// Vehicles
	class B_NorwayArmy_Jackal_2HMG_Woodland : UK3CB_BAF_Jackal2_L2A1_W_Tropical_OCimport_02 {
		author = "Jebby";
		scope = 2;
		scopeCurator = 2;
		displayName = "Jackal 2 HMG Woodland";
		side = 1;
		faction = "B_NorwayArmy_Woodland";
		crew = "B_NorwayArmy_Rifleman_Woodland";

		class Turrets : Turrets {
			class L111A1_MainTurret : L111A1_MainTurret { gunnerType = "B_NorwayArmy_Rifleman_Woodland"; };
			class L7A2_1_Turret : L7A2_1_Turret { gunnerType = "B_NorwayArmy_1IC_Woodland"; };
			class Right_Passenger_Cabin : Right_Passenger_Cabin { gunnerType = ""; };
			class Left_Passenger_Cabin : Left_Passenger_Cabin { gunnerType = ""; };
		};

		class EventHandlers : EventHandlers {
			class CBA_Extended_EventHandlers : CBA_Extended_EventHandlers_base {};
			class ALiVE_orbatCreator {
				init = "if (local (_this select 0)) then {_onSpawn = {sleep 0.3; _unit = _this select 0;};_this spawn _onSpawn;(_this select 0) addMPEventHandler ['MPRespawn', _onSpawn];};";
			};
		};

        class TransportMagazines { //HERE IS THE PROBLEM!!!!!!!!!!!!!
                class _xx_ACE_30End_556x45_Stanag_Mk318_mag {
                    magazines = "ACE_30End_556x45_Stanag_Mk318_mag";
                    count = 1;
                };
                class _xx_rhsusf_100Rnd_762x51_m62_tracer {
                    magazines = "rhsusf_100Rnd_762x51_m62_tracer";
                    count = 1;
                };
                class _xx_MRAWS_HEAT_F {
                    magazines = "MRAWS_HEAT_F";
                    count = 1;
                };
                class _xx_MRAWS_HE_F {
                    magazines = "MRAWS_HE_F";
                    count = 1;
                };
        };

        class TransportWeapons { //HERE IS THE PROBLEM!!!!!!!!!!!!!
                class _xx_SMA_HK416CUSTOMvfgB {
                    weapons = "SMA_HK416CUSTOMvfgB";
                    count = 1;
                };
                class _xx_launch_MRAWS_olive_rail_F {
                    weapons = "launch_MRAWS_olive_rail_F";
                    count = 1;
                };
        };

        class TransportItems { //HERE IS THE PROBLEM!!!!!!!!!!!!!
                class _xx_ACE_elasticBandage {
                    names = "ACE_elasticBandage";
                    count = 1;
                };
                class _xx_ACE_EarPlugs {
                    names = "ACE_EarPlugs";
                    count = 1;
                };
                class _xx_ACE_epinephrine {
                    names = "ACE_epinephrine";
                    count = 1;
                };
                class _xx_ACE_morphine {
                    names = "ACE_morphine";
                    count = 1;
                };
                class _xx_ACE_packingBandage {
                    names = "ACE_packingBandage";
                    count = 1;
                };
                class _xx_ACE_tourniquet {
                    names = "ACE_tourniquet";
                    count = 1;
                };
        };
       	// custom attributes (do not delete)
		ALiVE_orbatCreator_owned = 1;
	};

 

Look at "//HERE IS THE PROBLEM!!!!!!!!!!!!!" 

Anyways this code works:

Spoiler

               class TransportMagazines { //Well this does not work!!!
                class _xx_30Rnd_556x45_Stanag {
                    magazine = "B_556x45_Ball"; 
                    count = 10;
                };
            };

            class TransportWeapons { //This works!!!!
                class _xx_arifle_TRG20_F {
                    weapon = "arifle_TRG20_F";
                    count = 2;
                };
            };

            class TransportItems { //This Works!!!
                class _xx_FirstAidKit {
                    name = "FirstAidKit";
                    count = 20;
                };
                class _xx_Medikit {
                    name = "Medikit";
                    count = 1;
                };
            };

 

 

So I wounder why does this work but not the code I have made?.

 

LOL EDITED!!! I THINK I SEE WHY NOT... MY CODE I HAVE "weapons/magasines/names" 

and in the one that works it is "weapon/magasine/name" I will TEST this right away.

 

Didnt see it untill now I am blind. xD

I come back if this works!!!!!

 

Got it workin!!! This code worked:

Spoiler

        class TransportMagazines {
                class _xx_ACE_30Rnd_556x45_Stanag_Mk262_mag {
                    magazine = "ACE_30Rnd_556x45_Stanag_Mk262_mag";
                    count = 20;
                };
                class _xx_rhsusf_100Rnd_762x51_m62_tracer {
                    magazine = "rhsusf_100Rnd_762x51_m62_tracer";
                    count = 15;
                };
                class _xx_MRAWS_HEAT_F {
                    magazine = "MRAWS_HEAT_F";
                    count = 5;
                };
                class _xx_MRAWS_HE_F {
                    magazine = "MRAWS_HE_F";
                    count = 5;
                };
        };

        class TransportWeapons {
                class _xx_SMA_HK416CUSTOMvfgB {
                    weapon = "SMA_HK416CUSTOMvfgB";
                    count = 5;
                };
                class _xx_launch_MRAWS_olive_rail_F {
                    weapon = "launch_MRAWS_olive_rail_F";
                    count = 2;
                };
        };

        class TransportItems {
                class _xx_ACE_elasticBandage {
                    name = "ACE_elasticBandage";
                    count = 15;
                };
                class _xx_ACE_EarPlugs {
                    name = "ACE_EarPlugs";
                    count = 5;
                };
                class _xx_ACE_epinephrine {
                    name = "ACE_epinephrine";
                    count = 10;
                };
                class _xx_ACE_morphine {
                    name = "ACE_morphine";
                    count = 10;
                };
                class _xx_ACE_packingBandage {
                    name = "ACE_packingBandage";
                    count = 15;
                };
                class _xx_ACE_tourniquet {
                    name = "ACE_tourniquet";
                    count = 10;
                };
        };

 

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×