oyman 0 Posted April 20, 2005 I have some custom shells on my gun problem is that they dont eject heres what I have for the code in the cfg ammo part <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class CfgAmmo { class Default {}; class BulletSingle: Default{}; class oyman_ntwBullet: BulletSingle { airLock=true; hit=30; indirectHit=15; indirectHitRange=5; explosive=1; maxSpeed=2200; minRange=1; minRangeProbab=0.9000; midRange=2000; midRangeProbab=0.9000; maxRange=2500; maxRangeProbab=0.9000; cost=2; cartridge="oyman_ntwcart"; tracerColor[]={0,0,0,0}; }; }; its defined as my custom cartridge and in the cfg vehicles section its defined like this <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class oyman_ntwsoldier { all that other stuff }; class Thing: All {}; class ThingEffect: Thing {}; class oyman_ntwcart: ThingEffect { model="\oyman_ntw\oyman_20shell.p3d"; displayName="20mm"; submerged=0; submergeSpeed=0; timeToLive=30.00; disappearAtContact=1; }; }; model paths are right but I still dont get a custom shell popping out Share this post Link to post Share on other sites
korax 4 Posted April 20, 2005 Did you remember to put the nabojnicestart and nabojniceend points in the memory lod for the gun model? Share this post Link to post Share on other sites
oyman 0 Posted April 21, 2005 Did you remember to put the nabojnicestart and nabojniceend points in the memory lod for the gun model? yes, I did Share this post Link to post Share on other sites
raedor 8 Posted April 21, 2005 are you sure that your weapon uses your ammo? Share this post Link to post Share on other sites
canukausiuka 1 Posted April 21, 2005 Is it a fixed weapon, or small-arms? If a soldier is not carrying it, OFP does not create the shells. You'd have to use a script to do that. Share this post Link to post Share on other sites
oyman 0 Posted April 21, 2005 Is it a fixed weapon, or small-arms? If a soldier is not carrying it, OFP does not create the shells. You'd have to use a script to do that. ya I know that, its a sniper rifle so there shouldnt be any problems Share this post Link to post Share on other sites
canukausiuka 1 Posted April 21, 2005 Um, did you check your scope (eg: private, protected, public). I think the class ThingEffect is private, which means your casings are private too. Try making them protected. Share this post Link to post Share on other sites
oyman 0 Posted April 21, 2005 doh!, turns out i was missing a }; to close up the soldier part of the config thanks guys Share this post Link to post Share on other sites
canukausiuka 1 Posted April 21, 2005 Heheh, it happens. If you haven't yet, try using something like notepad++... it will make sure your brackets line up ;) Share this post Link to post Share on other sites
raedor 8 Posted April 22, 2005 Heheh, it happens. If you haven't yet, try using something like notepad++... it will make sure your brackets line up ;) yep, that's what i do, too. notepad++ is very comfortable for ofp scripting (without changing any options). Share this post Link to post Share on other sites
oyman 0 Posted April 22, 2005 I just tried notepad++ and I think it is very good, all cpp files open to notepad++ now thanks for the tip Share this post Link to post Share on other sites