Jump to content
Sign in to follow this  
charon productions

addmagazine and weapon config

Recommended Posts

Hey,

i haven`t worked with custom magazines and ammo since OFP.

I remember that at the time it was possible to add any custom magazine

to any weapon once it has been defined in CfgMagazines.

I have a hard time doing that in Arma2.

So is it necessary to ALSO define a new weapon in cfgWeapons that

contains the custom magazines in

magazines[] = {"Name1};
to be able to use
vehicle addmagazine "Mymagazine";

???

Search is difficult with these searchterms to yield the answer to this, any thought would be appreciated.

Charon

EDIT: Nevermind i simply declared the vehicle and weapons config additionally and now it works.

Edited by Charon Productions

Share this post


Link to post
Share on other sites

jet another post that basickly has a question. then edited .with. edit: i got it working without posting a solution for other people. this is why search somethimes is messy.

so i desided to post a quick example.

class CfgAmmo 
{
class MissileBase;
class My_Ammo : MissileBase 
{
	...
};
};

class CfgMagazines 
{
class Default;
class VehicleMagazine;
class My_Mag_Name : VehicleMagazine 
{
	...
	ammo = "My_Ammo";

};
};

class cfgWeapons
{	
class MissileLauncher;
class My_Launcher : MissileLauncher 
{
	...
	magazines[] = {"My_Mag_Name"};

};
};

this addweapon "My_Launcher"
this addmagazine "My_Mag_Name"

no offence Charon Productions

Share this post


Link to post
Share on other sites

@nuxil:

Look at it like that.

I would not post here if i had not intensively used the search.

That`s the whole point of people helping each other in the forum.

And i DID post the solution:

EDIT: Nevermind i simply declared the vehicle and weapons config additionally and now it works.

Thanks for your posted approach, i was however looking for a way to use the

already assigned weapons, as the hard-coded script was just looking for the onboard weapons and would not find additionally assigned ones.

So i added a config that extended the magazine declarations for the onboard weapons by the custom magazine in cfgweapons as well as the turret section of cfgvehicles.

Share this post


Link to post
Share on other sites
I would not post here if i had not intensively used the search.

i never said you didnt use search

That`s the whole point of people helping each other in the forum.

indeed

EDIT: Nevermind i simply declared the vehicle and weapons config additionally and now it works.

well. if i was a total noob to arma i would not understand what you meant about that,

so the next question would be.

how do i declared new magazines for a weapon?.

you see now why i said

edit: i got it working without posting a solution for other people. this is why search somethimes is messy.

i should have said.

edit: i got it working without posting a example for other people. this is why search sometimes is messy. :p

anyway glad you got it working.

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  

×