PDA

View Full Version : New class vehicles



AnGuS
Dec 29 2002, 22:30
Hi all,
i have a new model with his rtm´s of walf forward and backward.I create his config.cpp,here it is:

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

#define WeaponNoSlot 0 // dummy weapons
#define WeaponSlotPrimary 1 // primary weapons
#define WeaponSlotSecondary 16 // secondary weapons
#define WeaponSlotItem 256 // items
#define WeaponSlotBinocular 4096 // binocular
#define WeaponHardMounted 65536

class CfgPatches
{
class nu_vec
{
units[] = {example};
weapons[] = {};
requiredVersion = 1.75;
requiredAddons[] = {BIS_Resistance};
};
};


class CfgModels
{
class Default
{
sections[]={};
sectionsInherit="";
};

class nuvec: Default
{
sections[]={"cuerpo","pata izq","pata der","pie izq","pieder","pata baja izq","pata baja der"};
};
};



//acciones
class CfgNuVecActions
{
access=3;
Stop="";
WalkF="";
WalkB="";
};


//movimientos
class CfgMovesNuVec
{
access=1;
class Actions
{
class NoActionsAll: CfgNuVecActions
{
access=3;
};
class NoActions: NoActionsAll
{
turnSpeed=1;
upDegree=-1;
limitFast=5;
};

class StandActions: NoActions
{
stop="Stand";
default="Stand";
walkF="StandWalkF";
walkB="StandWalkB";
};
class Default
{
access=3;
actions="StandActions";
file="";
looped=1;
speed=0.500000;
disableWeapons=0;
enableOptics=1;
disableWeaponsLong=0;
showWeaponAim=1;
enableMissile=0;
enableBinocular=0;
showItemInHand=0;
showItemInRightHand=0;
showHandGun=0;
onLandBeg=0;
onLandEnd=0;
onLadder=0;
duty=-0.500000;
visibleSize=1;
aimPrecision=1;
recoilSuffix="";
relSpeedMin=1.000000;
relSpeedMax=1.000000;
soundEnabled=1;
soundOverride="";
soundEdge1=0.500000;
soundEdge2=1;
terminal=0;
limitGunMovement=1;
variantsPlayer[]={};
variantsAI[]={""};
equivalentTo="";
connectAs="";
variantAfter[]={5,10,20};
connectFrom[]={};
connectTo[]={};
interpolateWith[]={};
interpolateTo[]={};
interpolateFrom[]={};
aiming="";
legs="";
head="";
interpolationSpeed=6;
interpolationRestart=0;
preload=0;
};

class StandBase: Default
{
limitGunMovement=0;
aiming="aimingNo";
disableWeapons=1;
disableWeaponsLong=1;
};

class States
{
class Stand: StandBase
{
actions="StandActions";
file="\example\normal.rtm";
speed=10000000000.000000;
looped=1;
soundEnabled=0;
variantAfter[]={1,3,6};
variantsAI[]={};
equivalentTo="Stand";
interpolationSpeed=2;
interpolateTo[]={};
};

class StandWalkF: StandBase
{
actions="StandActions";
file="\example\walk.rtm";
speed=-1.200000;
looped=1;
duty=-0.700000;
relSpeedMin=0.700000;
relSpeedMax=1.000000;
interpolateTo[]={};
};
class StandWalkB: StandBase
{
actions="StandActions";
file="\example\walkB.rtm";
speed=-1.200000;
looped=1;
duty=-0.700000;
relSpeedMin=0.700000;
relSpeedMax=1.000000;
interpolateTo[]={};
};


};
};//Class Actions
};//CfgMovesNuVec


class CfgVehicles
{
access=1;
vehicleClass[]={"nuvec"};
class All{};
class AllVehicles:All{};
class Land:AllVehicles{};
class LandVehicle: Land {};
class nuvec: LandVehicle {};
{
scope=2;
side=TWest;
displayName="PAtas";
vehicleClass = "Mecha";
crew = "sebnam_acsoldier";
moves="CfgMovesMech";
model="\patas\patas.p3d";

};

};

AnGuS
Dec 29 2002, 22:35
Hi again,
i have a problem with the net.The last part is this way:
class CfgVehicles
{
access=1;
vehicleClass[]={"nuvec"};
class All{};
class AllVehicles:All{};
class Land:AllVehicles{};
class LandVehicle: Land {};
class nuvec: LandVehicle {};
{
scope=2;
side=TWest;
displayName="example";
vehicleClass = "nuvec";
crew = "sebnam_acsoldier";
moves="CfgMovesNuvec";
model="\example\nuvec.p3d";

};

};



So i know that in some places im mistake,but the problem is not all in the sintaxis or if some has forgotenn me.The really problem is if the idea i was thinkin could be posible.
The idea,basically,is to create a new class of object with his own Cfgmoves,CfgActions.. and not include the new vehicle in a existent class as tank,motorcycle or man.
Sorry for the error,if the idea that i was tryin to explain is not clear tell me.
Thanks all,
-AnGuS-

1B1KSniper
Dec 30 2002, 11:31
Iam working on someting very similar to this.
First thing:
the moves="CfgMovesMech";
doesn't match the class CfgMovesNuVec
They gotta match up or it won't work at all.
And I think the Class Default after Stand Actions has to gou under the Class States.
Other thatyn that I'm not sure.
Contact me if you get this to work cause I am animating a mech and trying to do the same thing.

AnGuS
Dec 31 2002, 10:34
Hi,
i sent u a mail,did u get it?
-AnGuS-