Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Making a weapon in oxygen?

  1. #11
    Retired Member
    Join Date
    May 26 2012
    Posts
    383
    Author of the Thread
    Quote Originally Posted by Slatts View Post
    This is a extremely handy tool for class names to inherit off, http://browser.six-projects.net/

    Heres a basic config to use


    Code:
    class CfgPatches
    {
    	class My_gun //I normally type the folder name here
            	{
             		units[]={"reserve for ammo box};
             	  	weapons[]={"My_gun"};
               		requiredVersion=1.00;
               		requiredAddons[]={};
    	};
    };
    class cfgAmmo
    {
    	class B_9x18_Ball;
    	class my_round: B_9x18_Ball
    	{
    		hit = 12; //damage
    	};
    };
    class CfgMagazines 
    {
    	class 8Rnd_9x18_Makarov;
    	class My_magazine_name : 8Rnd_9x18_Makarov
    	{
    		displayName = "Mag";
    		picture = "\folder\data\mag_icon.paa";
    		ammo = "My_round";
    		count = 5; //amount of rounds in a mag
    		initSpeed = 30;
    	};
    };
    
    class CfgWeapons
    {
    	class M9;
    	class My_gun: M9
          	{
    		model="\folder_name\model_name.p3d";
    		picture="\folder_name\data\gun_icon.paa";
    		uiPicture="\misc\iPistole.paa";
    		displayName="My Gun";
    		memorypointcamera = "eye";
    		magazines[]={"My_magazine_name"};
    	};
    };
    thank you slatts!

  2. #12
    Warrant Officer Slatts's Avatar
    Join Date
    Feb 6 2008
    Location
    Dublin, Ireland
    Posts
    2,486
    No problem


    Twitter: https://twitter.com/Slatts_modding
    PhotoBucket album: http://s296.beta.photobucket.com/use...o-man/library/

    For those who won't buy A3 because of Steam, all I can say is I'll be having the best 5 minutes of my life before my PC explodes in a massive fireball engulfing me as I laugh from dying at the awesomeness of Arma3.

    Slatts & HydroPump - Brothers in ArmA since 2002

  3. #13
    Retired Member
    Join Date
    May 26 2012
    Posts
    383
    Author of the Thread
    Uhh I am getting a small problem with the cfgAmmo


    This is the cfgAmmo from the gun
    Code:
    class CfgMagazines 
    {
    	class 8Rnd_9x18_Makarov;
    	class 10Rnd_Mauser : 8Rnd_9x18_Makarov
    	{
    		displayName = "Mauser C96 10Rnd Clip";
    		picture = "\mc96\data\clip.paa";
    		ammo = "7.63×25mm Mauser";
    		count = 5; //amount of rounds in a mag
    		initSpeed = 30;
    	};
    };
    What am I doing wrong?

  4. #14
    Warrant Officer Slatts's Avatar
    Join Date
    Feb 6 2008
    Location
    Dublin, Ireland
    Posts
    2,486
    One thing that stands out is the ammo= ""; line, can I see your cfgAmmo please?

  5. #15
    Retired Member
    Join Date
    May 26 2012
    Posts
    383
    Author of the Thread
    Quote Originally Posted by Slatts View Post
    One thing that stands out is the ammo= ""; line, can I see your cfgAmmo please?
    Oh I got the wrong cfg:

    Code:
    class cfgAmmo
    {
    	class B_9x18_Ball;
    	class M_9x18_Ball: B_9x18_Ball
    	{
    		hit = 15; //damage
    	};
    };

  6. #16
    Warrant Officer Slatts's Avatar
    Join Date
    Feb 6 2008
    Location
    Dublin, Ireland
    Posts
    2,486
    You see in your ammo = ""; line in cfgMag you have this "7.63×25mm Mauser"

    it should be ammo = "M_9x18_Ball";

    Ammo in the mag line tells the game that the bullet that is in this mag is X bullet. You aren't telling the player the ammo is 7.63×25mm Mauser. You are telling the game/program that the bullet is M_9x18_Ball

  7. #17
    Retired Member
    Join Date
    May 26 2012
    Posts
    383
    Author of the Thread
    Quote Originally Posted by Slatts View Post
    You see in your ammo = ""; line in cfgMag you have this "7.63×25mm Mauser"

    it should be ammo = "M_9x18_Ball";

    Ammo in the mag line tells the game that the bullet that is in this mag is X bullet. You aren't telling the player the ammo is 7.63×25mm Mauser. You are telling the game/program that the bullet is M_9x18_Ball
    Oh I see! thanks!

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Making enemy AI passive to players until they pick up a primary weapon
    By Gilson in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 2
    Last Post: Apr 17 2012, 01:05
  2. Making soldier not captive if he has a weapon
    By Morbo513 in forum ARMA - MISSION EDITING & SCRIPTING
    Replies: 0
    Last Post: Jun 22 2009, 19:38
  3. Making a weapon "silent"
    By Plastic_boy in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 0
    Last Post: Jul 22 2004, 10:36
  4. Making units crouch with weapon
    By madmedic in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 5
    Last Post: May 22 2003, 20:26
  5. Making units use a particular weapon
    By Ice Heart in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 2
    Last Post: Aug 27 2002, 07:39

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •