Jump to content
Sign in to follow this  
Grokk

Weapons on vehicles

Recommended Posts

Hi,

I'm working on a Fokker E.III for No Man's Land mod, but I can't get it working. Got it in air allright, it isnt a flight problem, but I cant get the machine gun on front working.

When I run ofp, nothing goes wrong, but as soon as I put the plane in the editor, and press preview, the game crashes.

I put the cpp I'm using below, hope that's the problem, but I guess it isnt, for normally ofp wont startup if the cpp file isnt correct.

Are there special selection names you should use when using a machine-gun on a plane? Or aren't they important at all and is everything defined in the cpp file?

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">#define TEast 0

#define TWest 1

#define TGuerrila 2

#define TCivilian 3

#define TSideUnknown 4

#define TEnemy 5

#define TFriendly 6

#define TLogic 7

#define true 1

#define false 0

#define private 0

#define protected 1

#define public 2

class CfgPatches

{

class NMLFokE3

{

units[] = { NMLFokkerE3};

weapons[] = {};

requiredVersion = 1.46;

};

       

};

class CfgAmmo

{

class Default {};

class BulletSingle: Default {};

class Bullet7_6: BulletSingle {};

class nmlbullet7_9: Bullet7_6

{

};

};

class CfgWeapons

{

class Default {};

class MGun: Default {};

class MachineGun7_6: MGun {};

class nmlMg7_9: MachineGun7_6

{

displayName="7.9mm machinegun";

displayNameMagazine="7.9mm machinegun";

shortNameMagazine="7.9mm Mgun";

ammo="nmlbullet7_9";

};

};

class CfgVehicles

{

class All {};

class AllVehicles: All {};

class Air: AllVehicles {};

class Plane: Air {};

       

class NMLFokkerE3: Plane

{

scope=public;

crew = "civilian2";

               side = 0;

displayName="NML Fokker E.III";

driverAction = ManActA10Pilot;

accuracy=0.50;

weapons[]={nmlmgun7_9};

magazines[]={nmlbullet7_9};                

armor=20;

               maxSpeed = 141;

model="\NML_fokkerE3\NML_fokkerE3.p3d";

               type=VAir;

//threat[] VSoft, VArmor, VAir

threat[]={0.2, 0.2, 1.0};

aileronSensitivity = 0.5;

elevatorSensitivity = 1;

gearRetracting = false;

ejectSpeed[]={0,0,0};

fov=0.5;

noseDownCoef = 1; // how much goes nose down during turns

brakeDistance=300;

};

};<span id='postcolor'>

Grokk

Share this post


Link to post
Share on other sites

1.) Define the new weapon in CfgPatches in Weapon section

2.) Put in "Count = number of butllets" in the weapon section of the machinegun.

I don't see anything else that's wrong here.

Share this post


Link to post
Share on other sites

Tried it, but it still doesnt work sad.gif

It keeps quitting.

Gonna test if it still works if I remove weapons stuff from the config.

Ok, I've traced the problem. It is somewhere in the weapons stuff, for I've removed it all from the config, and it worked again.

Hmm.. Tried some more.. Because it still is based on a10 (gonna change that in cessna), and I removed weapons and magazines from the cfgvehicles part, I got the original a10 loadout. Good news, and also, the m-gun fires from the right place. (Not sure because of wich memory point it is, for I've inserted some from a tank m-gun, hoping the plane would work then). If it's not kulomet, then it's one of the othere memory-lod points.

Anyway, this means the problem is in the cfgweapons part or cfgammo or cfgpatches, and cfgvehicles is ruled out. Anyone knows what could be wrong?

Grokk

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  

×