Jump to content
Sign in to follow this  
pipo1nsano

Help

Recommended Posts

my config.cpp does not worg how do i get it working

(when i plce the self mde unit in the addon folder and i start the game everything is ok but when i want to try the unit out (by placing it in the mission editor and presing the preview botten) it crashes into the desktop how do i fix this???

here is my config.cpp:

// 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 trailer{

units[] = {trailer};

weapons[] = {};

requiredVersion = 1.46;

};

};

class CfgModels

{

class default{};

class Vehicle: default{};

class Car: Vehicle{};

class trailer: Car{};

};

class CfgVehicles

{

class All {};

class AllVehicles: All {};

class Land: AllVehicles {};

class LandVehicle: Land {};

class Car: LandVehicle {};

class SkodaHelper: Car {};

class SkodaBase: SkodaHelper {};

class trailer: SkodaBase

{

vehicleClass="Car";

unitInfoType="UnitInfoShip";

scope=public;

cost=1000;

displayName=trailer;

picture=\trailer\trailer;

maxSpeed=274;

damperSize=0.100000;

damperForce=20;

wheelCircumference=2.400;

turnCoef=2.750000;

modelSpecial="";

animated=1;

preferRoads=1;

fuelCapacity=34;

transportSoldier=3;

terrainCoef=2.000000;

armorWheels=0.150000;

type=Armor;

armor=12;

armorEngine=1.2;

model=\trailer\trailer;

soundEngine[]={"\trailer\motor.wav",db-0.2,1.5};

soundGear[]={"Vehicles\Gear_Trans1",db-0.2,3.5};

threat[]={0.500000,0.500000,0.500000};

weapons[]={CarHorn};

magazines[]={};

typicalCargo[]={};

driverAction=ManActSkodaDriver;

dammageHalf[]=

{

jeep_kab_sklo1.paa,jeep_kab_sklo1B.paa

};

dammageFull[]=

{

jeep_kab_sklo1.paa,jeep_kab_sklo1C.paa

};

class Animations

{

class doors

{

type="rotation";

animPeriod=10;

selection="doors";

axis="osa_doors";

angle0=0;

angle1=-1.6;

};

};

class UserActions

{

class Opendoors

{

displayName="Open doors";

position="osa_doors";

radius=2.5;

condition="this animationPhase ""doors"" < 0.5";

statement="this animate [""doors"", 1]";

};

class Closedoors

{

displayName="Close doors";

position="osa_doors";

radius=2.5;

condition="this animationPhase ""doors"" >= 0.5";

statement="this animate [""doors"", 0]";

};

};

};

};

confused.gifconfused.gifconfused.gifconfused.gifconfused.gifconfused.gifconfused.gifconfused.gif

please help me

Share this post


Link to post
Share on other sites

Try to format your source code -it's nearly impossible to trace all brackets... wink.gif

Ok, there were some {} in wrong places and some "" missing. It should work now -but I haven't checked the syntax, so feel free to post any error code.

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

// 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 trailer

    {

         units[] = {trailer};

         weapons[] = {};

         requiredVersion = 1.46;

    }

};

class CfgModels

{

    class default{};

    class Vehicle: default{};

    class Car: Vehicle{};

    class trailer: Car{};

};

class CfgVehicles

{

    class All {};

    class AllVehicles: All {};

    class Land: AllVehicles {};

    class LandVehicle: Land {};

    class Car: LandVehicle {};

    class SkodaHelper: Car {};

    class SkodaBase: SkodaHelper {};

    class trailer: SkodaBase

    {

         vehicleClass = "Car";

         unitInfoType = "UnitInfoShip";

         scope = public;

         cost = 1000;

         displayName = "trailer";

         picture = "\trailer\trailer";

         maxSpeed = 274;

         damperSize = 0.100000;

         damperForce = 20;

         wheelCircumference = 2.400;

         turnCoef = 2.750000;

         modelSpecial = "";

         animated = 1;

         preferRoads = 1;

         fuelCapacity = 34;

         transportSoldier = 3;

         terrainCoef = 2.000000;

         armorWheels = 0.150000;

         type = Armor;

         armor = 12;

         armorEngine = 1.2;

         model = "\trailer\trailer";

         soundEngine[] = {"\trailer\motor.wav",db-0.2,1.5};

         soundGear[] = {"Vehicles\Gear_Trans1",db-0.2,3.5};

         threat[] = {0.500000,0.500000,0.500000};

         weapons[] = {CarHorn};

         magazines[] = {};

         typicalCargo[] = {};

         driverAction = ManActSkodaDriver;

         dammageHalf[] =

         {

              jeep_kab_sklo1.paa,jeep_kab_sklo1B.paa

         };

         dammageFull[] =

         {

              jeep_kab_sklo1.paa,jeep_kab_sklo1C.paa

         };

         class Animations

         {

              class doors

              {

                   type = "rotation";

                   animPeriod = 10;

                   selection = "doors";

                   axis = "osa_doors";

                   angle0 = 0;

                   angle1 = -1.6;

              };

         };

         class UserActions

         {

              class Opendoors

              {

                   displayName = "Open doors";

                   position = "osa_doors";

                   radius = 2.5;

                   condition = "this animationPhase ""doors"" < 0.5";

                   statement = "this animate [""doors"", 1]";

              };

         class Closedoors

         {

              displayName = "Close doors";

              position = "osa_doors";

              radius = 2.5;

              condition = "this animationPhase ""doors"" >= 0.5";

              statement = "this animate [""doors"", 0]";

         };

    };

};

<span id='postcolor'>

Share this post


Link to post
Share on other sites

do you need an driver proxy in the vihicle to difine it as a car??

would it work when i place cargo proxy`s in it??

(the trailer works when i difine it as static but i want it to bee moveble)

Share this post


Link to post
Share on other sites

whoooooooooooojeah i fixed the problem

(you cant use your own names for the animatians you must use dvere1 i used doors so it did not work)

so dont do it like this:

class Animations

{

class doors

{

type = "rotation";

animPeriod = 10;

selection = "doors";

axis = "osa_doors";

angle0 = 0;

angle1 = -1.6;

};

};

class UserActions

{

class Opendoors

{

displayName = "Open doors";

position = "osa_doors";

radius = 4.5;

condition = "this animationPhase ""doors"" < 0.5";

statement = "this animate [""doors"", 1]";

};

class Closedoors

{

displayName = "Close doors";

position = "osa_doors";

radius = 4.5;

condition = "this animationPhase ""doors"" >= 0.5";

statement = "this animate [""doors"", 0]";

};

};

};

do it like this:

class Animations

{

class dvere1

{

type = "rotation";

animPeriod = 10;

selection = "dvere1";

axis = "osa_dvere1";

angle0 = 0;

angle1 = -1.6;

};

};

class UserActions

{

class Opendoors

{

displayName = "Open doors";

position = "osa_dvere1";

radius = 4.5;

condition = "this animationPhase ""dvere1"" < 0.5";

statement = "this animate [""dvere1"", 1]";

};

class Closedoors

{

displayName = "Close doors";

position = "osa_dvere1";

radius = 4.5;

condition = "this animationPhase ""dvere1"" >= 0.5";

statement = "this animate [""dvere1"", 0]";

};

};

};

ooh yeah before i forget a big tanx to der bastler for solving the { and }; thingies

biggrin.gifbiggrin.gifbiggrin.gifbiggrin.gifbiggrin.gifbiggrin.gifbiggrin.gifbiggrin.gifbiggrin.gifbiggrin.gifbiggrin.gifbiggrin.gifbiggrin.gifbiggrin.gifbiggrin.gifbiggrin.gifbiggrin.gif

whooo yeah

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  

×