OFPEC Forum
Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: bradical02 on 27 Mar 2003, 22:39:32
-
I am making an FW-190 that will probably be released soon, but I am having trouble with the config file.
Here is the CfgVehicles section
class CfgVehicles
{
class All {};
class AllVehicles: All {};
class Air: AllVehicles {};
class Plane: Air {};
class A10: Plane {};
class fw190c: A10
{
scope=public;
side=TEast;
displayName="FW-190C";
model="\fw190c\fw190c";
accuracy=0.30;
gearRetracting = true;
nameSound="engine";
soundEngine[]={"\fw190c\engine.wav",db-10,1};
soundEnviron[]={"Objects\noise",db-60,1.0};
soundServo[]={"Vehicles\gun_elevate",db-40,0.4};
maneuvrability=30.0;
maxSpeed=500;
armor=50;
aileronSensitivity = .8;
elevatorSensitivity = .8;
noseDownCoef = .2;
landingAoa = 10*3.1415/180;
brakeDistance=200;
steerAheadSimul=1.0;
steerAheadPlan=2.0;
transportSoldier=0;
crew = "SoldierEPilot";
driverAction = ManActUH60Pilot;
extCameraPosition[]={0,3,-15};
irTarget=false;
irScanRange = 0;
irScanGround = false;
weapons[]={};
magazines[]={};
Class Animations
{
Class corcanopy
{
type = "rotation";
animperiod = 2.5;
selection ="Canopy";
axis = "osa Canopy";
angle0 = 0;
angle1= 0.03;
class UserActions
{
class corcanopyO
{
displayName="Open Canopy";
position="canopy";
radius=50
condition="this animationPhase ""corcanopy"" < 0.03 and driver this == player ";
statement="this animate [""corcanopy"", 1]";
};
class corcanopyC
{
displayName="Close Canopy";
position="canopy";
radius=50
condition="this animationPhase ""corcanopy"" >= .03 and driver this == player ";
statement="this animate [""corcanopy"", 0]";
};
};
Here is the error message I get when trying to load up Flashpoint.
'fw190c\config.cpp/cfgvehicles/fw190c.class':'A' encountered instead of '='
As you can see, I have a custom animation so I think something might be wrong there. Thanks for any help.
-
Yes I think there's a "}" missing. I strongly recommend you put your config into nice C-style, like so:
class 1
{
class 2
{
class 3
{
}
}
}
then you won't run into such probs ;)
-
ahhhh i knew it was something little like that. i'll put it in the style you use now and we'll see how that goes.
-
i've attached my config file. do you know where i am missing the '{' thing?? Thanks.
-
Looks like your missing them here:
   Class Animations
   {
      Class corcanopy
      {
      type = "rotation";
      animperiod = 2.5;
      selection ="Canopy";
      axis = "osa Canopy";
      angle0 = 0;
      angle1= 0.03;
};
};
and here:
   class UserActions
   {
   class corcanopyO
      {
      displayName="Open Canopy";
      position="canopy";
      radius=50
      condition="this animationPhase ""corcanopy"" < 0.03 and driver this == player ";
      statement="this animate [""corcanopy"", 1]";
      };
      class corcanopyC
      {
      displayName="Close Canopy";
      position="canopy";
      radius=50
      condition="this animationPhase ""corcanopy"" >= .03 and driver this == player ";
      statement="this animate [""corcanopy"", 0]";
};
};
Or check out the attached modified file. ;)
(Its a bit clearer to see what I mean in the modified file than what I put above).
-
bah. same error message. me and configs dont mix. :'(
-
Hmm, not sure. Sorry about that. :-\
Is there anything you didnt include in the config you uploaded that could be causing problems?
-
hmmm what do you mean? I made it from scratch when I was copying off of IEG's F4 corsair. Is there an '=' sign missing somewhere? cuz I always get the error message 'A encountered instead of ='. Thanks.
-
G'day
I'm thinkin' you need one just before class animations, 2 at the end of class corcanopy and 1 at the end of the whole thing
hope this helps
L8R
-
eh thanks anyway guys but nothin seemed to work. I think i'll pirate someone else's config file and modify it to suit my needs. Is that illegal?
-
I don't think there is anything wrong with looking at someone else's cpps and learning from them or even using them as a template for your own. But, if the cpp includes custom work (such as scripts) then you should ask permission and give credit.
SelectThis