Jump to content
Sign in to follow this  
<>Crippler<>

Cpp probs (again sorry)

Recommended Posts

Hey smile_o.gif As usual, i'm having probs with the cpp i'm making for the Lightning sad_o.gif Ingame, I get the error cannot open object data3d/rafredtop.p3d. The proxy on the plane is called RAFredtop and thats what I have called the Classname of the missile so I cant see what I'm doing wrong sad_o.gif. Heres the cpp if anyone can help-

Quote[/b] ]

// some basic defines

#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

// type scope

#define private 0

#define protected 1

#define public 2

class CfgPatches

{

class RAFLightning

{

units[] = {RAFLightning};

requiredVersion = 1.8;

};

};

class CfgAmmo

{

class Default {};

class AT3: Default {};

class CarlGustav: AT3 {};

class AA : CarlGustav {};

class RAFredtop : AA

{

minRange=300; minRangeProbab=0.9;

midRange=700; midRangeProbab=0.95;

maxRange=1800; maxRangeProbab=0.85;

proxyShape="\raflightning\RAFredtop.p3d";

maneuvrability=70;

airLock=true;

irLock=false;

laserLock=false;

initTime=0.5;

maxLeadSpeed=2500;

thrustTime=500;

maxControlRange=3000;

thrust=400;

maxSpeed=1000;

hit=200;indirectHit=100;indirectHitRange=8;

model="\raflightning\RAFredtop.p3d";

};

class BulletSingle: Default {};

class ExplosiveBullet: BulletSingle {};

class Bullet30: ExplosiveBullet {};

class LIGHTNINGBULLET: Bullet30

{

hit=30;

indirectHit=10;

explosive=1;

indirecthitrange=1.5

};

};

class CfgWeapons

{

class Default {};

class LAWLauncher: Default {};

class CarlGustavLauncher : LAWLauncher {};

class AT3Launcher: CarlGustavLauncher {};

class RAFREDTOPRAIL: AT3Launcher

{

ammo=RAFredtop;

displayName="Red Top Missile";

displayNameMagazine="Red Top";

shortNameMagazine="Red Top";

count=2;

initSpeed=15;

reloadTime = 3;

model = "\raflightning\RAFredtop.p3d";

proxyShape= "\raflightning\RAFredtop.p3d";

aiRateOfFire=5.0;

aiRateOfFireDistance=0.01;

};

class MGun: Default {};

class MachineGun7_6: MGun {};

class MachineGun30: MachineGun7_6 {};

class LightningGun: MachineGun30

{

displayName="Aden Mk4";

displayNameMagazine="Aden mag";

shortNameMagazine="Aden mag";

ammo="LIGHTNINGBULLET";

count=240;

reloadTime=0.10000;

aiRateOfFire=0.2;

aiRateOfFireDistance=200;

};

};

class CfgVehicles

{

class All {};

class AllVehicles : All {};

class Air : AllVehicles {};

class Plane : Air {};

class RAFlightning : Plane

{

scope = public;

crew = "SoldierWPilot";

side = TWest;

displayName="English Electric Lightning";

accuracy=0.30;

irTarget=1;

irScanRange=6000;

irScanGround=1;

driverAction = ManActA10Pilot;

vehicleclass=Royal Air Force

maxSpeed = 1500;

brakeDistance=30;

aileronSensitivity = 0.3;

elevatorSensitivity = 1.0;

noseDownCoef = 0.3;

fov=0.8;

soundEngine[]={"\RAFlightning\engine.ogg",10.000000,1.000000};

armor=70;

cost=20000;

type=VAir;

threat[]={0.5, 0.7, 0.9};

model="\RAFlightning\lightning.p3d";

weapons[]={ RAFREDTOPRAIL, LightningGun};

magazines[]={ RAFREDTOPRAIL, LightningGun};

animated =1;

class Animations

{

class LeftGear

{

type ="rotation";

animPeriod =2;

selection ="left wheel";

axis ="left wheel axis";

angle0 =0;

angle1 =1.5;

};

class RightGear

{

type ="rotation";

animPeriod =2;

selection ="right wheel";

axis ="right wheel axis";

angle0 =0;

angle1 =-1.5;

};

class NoseGear

{

type ="rotation";

animPeriod =2;

selection ="nose wheel";

axis ="nose wheel axis";

angle0 =0;

angle1 =-2;

};

};

class EventHandlers

{

init = [_this select 0] exec "\RAFlightning\checkgear.sqs",[_this select 0] exec "\RAFlightning\burner.sqs";

gear="if (_this Select 1) then {[_this select 0] exec""\RAFlightning\geardown.sqs""} else {[_this select 0] exec ""\RAFlightning\gearup.sqs""}";

};

class CfgRadio

{

class lightningAfterburn

{

name = "";

sound[] = {\RAFlightning\lightningafterburner.ogg, db-60, 1.0};

title = ;

};

};

class CfgNonAIVehicles

{

class ProxyWeapon {};

class ProxyRAFredtop: ProxyWeapon

{

model="\RAFlightning\RAFredtop";

simulation="maverickweapon";

};

};

Any help is much appreciated smile_o.gif

Crippler crazy_o.gif

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> vehicleclass=Royal Air Force

maxSpeed = 1500;

brakeDistance=30;

aileronSensitivity = 0.3;

i see one mistake ur missing a ";" after RAF. And use quotes ("") for strings:

Quote[/b] ]vehicleclass="Royal Air Force";

im sure tis not the solution to ur prob but non the less an error

Share this post


Link to post
Share on other sites

Thanks- that was what I thought, but it appears that vehicleclass works without quotes or end lines, I dont know why crazy_o.gif

Share this post


Link to post
Share on other sites

Only thing I can see wrong is this:

cfgvehicles

weapons[]={ RAFREDTOPRAIL, LightningGun};

magazines[]={ RAFREDTOPRAIL, LightningGun};

Should be:

weapons[]={ RAFREDTOPRAIL, LightningGun};

magazines[]={ RAFredtop, LIGHTNINGBULLET};

and the fact you don't have a cfgmodels

class CfgModels

{

class Default{};

class weapon : default {};

class Vehicle: Default{};

class RafLightning: Vehicle

{

sectionsInherit="Vehicle";

sections[]={"vrtule staticka","vrtule blur",};

};

class RAFredtop : weapon {};

};

};

Share this post


Link to post
Share on other sites

That didnt seem to work either sad_o.gif I'm getting the same error sad_o.gif

Quote[/b] ]

weapons[]={ RAFREDTOPRAIL, LightningGun};

magazines[]={ RAFREDTOPRAIL, LightningGun};

I've seen on most addons that this weapons and magazines bit contains the same names (dont know why) -and when I changed it i got the no entry .modelspecial error anyway sad_o.gif Thanks anyway though smile_o.gif

Crippler

Share this post


Link to post
Share on other sites
Quote[/b] ]

class CfgWeapons

{

class Default {};

class LAWLauncher: Default {};

class CarlGustavLauncher : LAWLauncher {};

class AT3Launcher: CarlGustavLauncher {};

class RAFREDTOPRAIL: AT3Launcher

{

ammo=RAFredtop;

displayName="Red Top Missile";

displayNameMagazine="Red Top";

shortNameMagazine="Red Top";

count=2;

initSpeed=15;

reloadTime = 3;

model = "\raflightning\RAFredtop.p3d";

proxyShape= "\raflightning\RAFredtop.p3d";

aiRateOfFire=5.0;

aiRateOfFireDistance=0.01;

};

class MGun: Default {};

class MachineGun7_6: MGun {};

class MachineGun30: MachineGun7_6 {};

class LightningGun: MachineGun30

{

displayName="Aden Mk4";

displayNameMagazine="Aden mag";

shortNameMagazine="Aden mag";

ammo="LIGHTNINGBULLET";

count=240;

reloadTime=0.10000;

aiRateOfFire=0.2;

aiRateOfFireDistance=200;

};

};

Crippler,

Not sure if this will fix it, but try taking out the lines model= & proxyShape= from the cfgweapons sections, you should only need to define them once in cfgammo...

-Cos.

Share this post


Link to post
Share on other sites
That didnt seem to work either sad_o.gif I'm getting the same error sad_o.gif
Quote[/b] ]

weapons[]={ RAFREDTOPRAIL, LightningGun};

magazines[]={ RAFREDTOPRAIL, LightningGun};

I've seen on most addons that this weapons and magazines bit contains the same names (dont know why) -and when I changed it i got the no entry .modelspecial error anyway sad_o.gif Thanks anyway though smile_o.gif

Crippler

Yes, I name my ammo and weapons the same name.The thing is...you didn't.Look in your ammo classes

magazines[]={ RAFREDTOPRAIL, LightningGun};

Doesn't even exist

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  

×