PDA

View Full Version : Help



pipo1nsano
Oct 3 2002, 12:33
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]";
};



};





};
};



http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/confused.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/confused.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/confused.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/confused.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/confused.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/confused.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/confused.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/confused.gif

please help me

pipo1nsano
Oct 3 2002, 12:34
sorry i forgot i "stole"the config from a car http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/tounge.gif

der bastler
Oct 3 2002, 17:07
Try to format your source code -it&#39;s nearly impossible to trace all brackets... http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/wink.gif

Ok, there were some {} in wrong places and some "" missing. It should work now -but I haven&#39;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&#91;&#93; = {trailer};
         weapons&#91;&#93; = {};
         requiredVersion = 1.46;
    }
};

class CfgModels
{
    class default{};
    class Vehicle&#58; default{};
    class Car&#58; Vehicle{};
    class trailer&#58; Car{};
};


class CfgVehicles
{
    class All {};
    class AllVehicles&#58; All {};
    class Land&#58; AllVehicles {};
    class LandVehicle&#58; Land {};
    class Car&#58; LandVehicle {};
    class SkodaHelper&#58; Car {};
    class SkodaBase&#58; SkodaHelper {};
    class trailer&#58; SkodaBase
    {
         vehicleClass = &#34;Car&#34;;
         unitInfoType = &#34;UnitInfoShip&#34;;
         scope = public;
         cost = 1000;

         displayName = &#34;trailer&#34;;
         picture = &#34;&#92;trailer&#92;trailer&#34;;

         maxSpeed = 274;
         damperSize = 0.100000;
         damperForce = 20;
         wheelCircumference = 2.400;
         turnCoef = 2.750000;

         modelSpecial = &#34;&#34;;
         animated = 1;

         preferRoads = 1;
         fuelCapacity = 34;
         transportSoldier = 3;

         terrainCoef = 2.000000;
         armorWheels = 0.150000;

         type = Armor;
         armor = 12;
         armorEngine = 1.2;

         model = &#34;&#92;trailer&#92;trailer&#34;;

         soundEngine&#91;&#93; = {&#34;&#92;trailer&#92;motor.wav&#34;,db-0.2,1.5};
         soundGear&#91;&#93; = {&#34;Vehicles&#92;Gear_Trans1&#34;,db-0.2,3.5};

         threat&#91;&#93; = {0.500000,0.500000,0.500000};

         weapons&#91;&#93; = {CarHorn};
         magazines&#91;&#93; = {};

         typicalCargo&#91;&#93; = {};

         driverAction = ManActSkodaDriver;

         dammageHalf&#91;&#93; =
         {
              jeep_kab_sklo1.paa,jeep_kab_sklo1B.paa
         };

         dammageFull&#91;&#93; =
         {
              jeep_kab_sklo1.paa,jeep_kab_sklo1C.paa
         };

         class Animations
         {
              class doors
              {
                   type = &#34;rotation&#34;;
                   animPeriod = 10;
                   selection = &#34;doors&#34;;
                   axis = &#34;osa_doors&#34;;
                   angle0 = 0;
                   angle1 = -1.6;
              };
         };

         class UserActions
         {
              class Opendoors
              {
                   displayName = &#34;Open doors&#34;;
                   position = &#34;osa_doors&#34;;
                   radius = 2.5;
                   condition = &#34;this animationPhase &#34;&#34;doors&#34;&#34; &#60; 0.5&#34;;
                   statement = &#34;this animate &#91;&#34;&#34;doors&#34;&#34;, 1&#93;&#34;;
              };

         class Closedoors
         {
              displayName = &#34;Close doors&#34;;
              position = &#34;osa_doors&#34;;
              radius = 2.5;
              condition = &#34;this animationPhase &#34;&#34;doors&#34;&#34; &#62;= 0.5&#34;;
              statement = &#34;this animate &#91;&#34;&#34;doors&#34;&#34;, 0&#93;&#34;;
         };
    };
};
[/QUOTE]<span id='postcolor'>

pipo1nsano
Oct 3 2002, 18:27
stel crashes into desktop http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/mad.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/mad.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/mad.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/mad.gif

pipo1nsano
Oct 4 2002, 07:16
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)

pipo1nsano
Oct 6 2002, 19:58
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


http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif http://www.flashpoint1985.com/ikonboard301/iB_html/non-cgi/emoticons/biggrin.gif
whooo yeah