EricJ 765 Posted March 12, 2006 I've been trying to make up a Breaching charge for a weapons pack, as well as one for the XDF weapons pack. Problem is, I get it configged right (i.e. it shows up how it's supposed to, but when I try to place it on the ground, it doesn't work: Quote[/b] ]CfgAmmo: class M38Charge: PipeBomb { hit=600;indirectHit=1;indirectHitRange=1; minRange=1;minRangeProbab=0.30; midRange=2;midRangeProbab=0.55; maxRange=4;maxRangeProbab=0.00; cost=40; model=satchel.p3d; visibleFire=2; audibleFire=0.25; visibleFireTime=0; picture="\M4-16C\inv\m16Mag.paa"; }; CfgWeapons: class M38A1 : Default { //-- scopeWeapon = private; scopeMagazine = public; enableAttack = true; valueMagazine = 5; magazineType = 1 * WeaponSlotItem; ammo=M38Charge; displayName=Wall Breaching Charge; displayNameMagazine=Wall Breaching Charge; shortNameMagazine=Breaching Charge; count=1; initSpeed=0; maxLeadSpeed=0; showEmpty = false; useAction = true; useActionTitle = Set Breaching Charge; sound[]={People\gravel_L,db-70,1}; magazines[] = {this}; /* magazines[] = {this}; modes[] = {this, TouchOff}; class TouchOff : Default { ammo = ""; displayName="Touch Off"; reloadTime=0.0; sound[]={,0,1}; magazines[] = {}; useAction = true; useActionTitle = "Touch Off Breaching Charge(s)"; }; */ }; Like I said, there's no errors, just it won't place it on the ground so I can use it. Share this post Link to post Share on other sites
.kju 3245 Posted March 12, 2006 check WGL code - should be in wgl_wep_config http://www.squadengine.com/forums....ic=1446 Share this post Link to post Share on other sites
EricJ 765 Posted March 12, 2006 Thanks, could you just send the config rather than me having to download 116MB to look at a vastly smaller file? Share this post Link to post Share on other sites
EvEnLeaSe44 0 Posted March 12, 2006 In SFP mod they have breaching charges, try there to Share this post Link to post Share on other sites
the_shadow 0 Posted March 12, 2006 Swedish Forces Pack yes, they have a couple of custom satchel/breaching charges... Share this post Link to post Share on other sites
SPQR 0 Posted March 12, 2006 I fear that OFP doesn't like entirely new weapon class. As it must be done with the throw and several kind of grenades. First, as it concerns satchel charge, instead of basing it on default class, base it on the pipebomb class. Second, a satchel can be used if the soldier has the weapon "Put". Inside the "Put" weapon, your weapon can't be defined as possible magazine for this weapon : Quote[/b] ] class Put : Default { //-- scopeWeapon = protected; scopeMagazine = private; valueWeapon = 0; weaponType = WeaponNoSlot; displayName=$STR_DN_PUT; sound[]={,db-70,1}; reloadSound[]={,db-70,1}; canLock=LockNo; enableAttack=false; optics = false; primary=false; showEmpty = false; magazines[] = {TimeBomb, PipeBomb, Mine, MineE}; canDrop = false; }; So you should create a weapon as Put2 for exemple : Quote[/b] ] class Put : Default{}; class Put2 : Put { //-- scopeWeapon = protected; scopeMagazine = private; valueWeapon = 0; weaponType = WeaponNoSlot; displayName=$STR_DN_PUT; sound[]={,db-70,1}; reloadSound[]={,db-70,1}; canLock=LockNo; enableAttack=false; optics = false; primary=false; showEmpty = false; magazines[] = {"TimeBomb","PipeBomb","M38A1","Mine","MineE"}; canDrop = false; }; This way, your soldier should be able to use all OFP satchels, mine, and your weapon... Well I hope so Share this post Link to post Share on other sites
EricJ 765 Posted March 12, 2006 Thanks , then I'm assuming my actual weapon's classname should be, and this is what I did: Quote[/b] ]class cfgWeapons { class Default {}; class MGun: Default {}; class Riffle: MGun {}; class M16: Riffle {}; class M4 : Riffle{}; class AK47: Riffle {}; class AK74: Riffle {}; class MachineGun7_6: MGun {}; class MachineGun7_6Manual: MachineGun7_6 {}; class Put: Default {}; class Put2 : Put { //-- scopeWeapon = protected; scopeMagazine = private; valueWeapon = 0; weaponType = WeaponNoSlot; displayName=$STR_DN_PUT; sound[]={,db-70,1}; reloadSound[]={,db-70,1}; canLock=LockNo; enableAttack=false; optics = false; primary=false; showEmpty = false; magazines[] = {"TimeBomb","PipeBomb","M38A1","Mine","MineE& amp; quot;}; canDrop = false; }; class Pipebomb: Put2{}; class M38A1 : Pipebomb { //-- scopeWeapon = private; scopeMagazine = public; enableAttack = true; valueMagazine = 5; magazineType = 1 * WeaponSlotItem; ammo=M38Charge; displayName=Wall Breaching Charge; displayNameMagazine=Wall Breaching Charge; shortNameMagazine=Breaching Charge; count=1; initSpeed=0; maxLeadSpeed=0; showEmpty = false; useAction = true; useActionTitle = Set Breaching Charge; sound[]={People\gravel_L,db-70,1}; magazines[] = {this}; /* magazines[] = {this}; modes[] = {this, TouchOff}; class TouchOff : Default { ammo = ""; displayName="Touch Off"; reloadTime=0.0; sound[]={,0,1}; magazines[] = {}; useAction = true; useActionTitle = "Touch Off Breaching Charge(s)"; }; */ }; Share this post Link to post Share on other sites
SPQR 0 Posted March 12, 2006 Most important, does it work ? Don't forget to add ind your soldier's configVehicle : weapons[]={M16, Put2, DefaultManWeapons}; or weapons[]={M16, Throw, Put2}; Share this post Link to post Share on other sites
EricJ 765 Posted March 12, 2006 Nope still the same old thing, I can access it in the menu, but still can't place it. But will add those lines.. Share this post Link to post Share on other sites
EricJ 765 Posted March 12, 2006 WOOOHOOOO I have got it! Â Thanks for referrring the mods, though I finaly downloaded SFP4 and did some code-bashing.. how it works, I don't know, but it worked! And of course thanks SPQR Now that I got it working, do I have to only specify "ej_put" for all my units, or can I have it to where anybody can pick them up and use them? Share this post Link to post Share on other sites
Jackal326 1181 Posted March 13, 2006 Now that I got it working, do I have to only specify "ej_put" for all my units, or can I have it to where anybody can pick them up and use them? AFAIK, only units with the "EJ_Put" 'weapon' will be able to correctly use your custom satchel, much in the same way only SFP units can use the SFP charges. Share this post Link to post Share on other sites
EricJ 765 Posted March 13, 2006 Ahh gotcha, though through testing if I add 'this addweapon "ej_put" it doesn't seem to affect anything, or allows it to work. I still need to refine it but so far that looks like the course of action right now. Share this post Link to post Share on other sites