Jump to content
Sign in to follow this  
KernelPanicAkr

Create new ammo tipes

Recommended Posts

Hi, I'm trying to define a new Ammo type in a Mission (non-moded). I thought it could be possible to do so in the Description.ext. I'm trying to override "launch_RPG32_F", defining "launch_RPG32_EMP_F". Here's what I'm doing so far:

class CfgPatches {
class RPG32_EMP_F {
	requiredaddons = {"A3_Weapons_F"};
	requiredversion = 1.000000;
	weapons = {"RPG32_EMP_F"};
};
};

class CfgAmmo {
/*extern*/ class Default;
/*extern*/ class BulletCore;
/*extern*/ class RPG32_F;

class RPG32_EMP_F: RPG32_F {
	displayName = "EMP Rocket";
	displayNameShort = "EMP Rocket";
	descriptionShort = "EMP Rocket";
	model = "\A3\weapons_f\launchers\RPG32\tbg32v_rocket_item.p3d";
	picture = "\A3\Weapons_F\launchers\RPG32\data\UI\gear_tbg32v_rocket_ca.paa";
	ammo = "R_TBG32V_EMP_F";
	mass = 40;
};
};
class CfgWeapons {

/*extern*/ class launch_RPG32_F;

class launch_RPG32_EMP_F: launch_RPG32_F {
	_generalMacro = "launch_RPG32_EMP_F";

	magazines = {"RPG32_EMP_F"};

};
};

I usually get EOF, and I'm getting lost. I just want to create a new ammo type, recycling all the models & stuff.

What could I do?

---------- Post added at 22:36 ---------- Previous post was at 22:25 ----------

Update: Now won't crash, but still, it don't detects the new ammo type.

class CfgPatches {
class RPG32_EMP_F {
	requiredaddons[] = {"A3_Weapons_F"};
	weapons[] = {"RPG32_EMP_F"};
	author[]= {"Akryllax"}; 
};
};

class CfgAmmo {
/*extern*/ class R_PG32V_F;

class R_TBG32V_EMP_F: R_PG32V_F {
	hit = 0;
	indirectHit = 0;
	indirectHitRange = 50;
	explosive = 1;
};
};

class CfgMagazines {

/*extern*/ class Default;
/*extern*/ class BulletCore;
/*extern*/ class RPG32_F;

class RPG32_EMP_F: RPG32_F {
	displayName = "EMP Rocket";
	displayNameShort = "EMP Rocket";
	descriptionShort = "EMP Rocket";
	ammo = "R_TBG32V_EMP_F";
};

};

class CfgWeapons {

/*extern*/ class launch_RPG32_F;

class launch_RPG32_EMP_F: launch_RPG32_F {
	_generalMacro = "launch_RPG32_EMP_F";

	magazines = {"RPG32_EMP_F"};

};
};

Share this post


Link to post
Share on other sites

It has to be done in the config, eg an addon, it cannot be done in the description.ext

Share this post


Link to post
Share on other sites

There's no work arround? I need the rocket to do 0 damage, while it can be done by HandleDamage, for localitys issues I prefer to avoid it.

Share this post


Link to post
Share on other sites

Terox is right. Either you do this by creating an addon with your own custom ammo configs or you handle this with an EH. Your purpose is one of the many which EHs have been created for. They're easy to use and they do their job (most of the time). So what's the matter with EHs anyway?

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
Sign in to follow this  

×