Hi. I'm doing my best to configure a bicycle, but I'll be damned if I can do it. I've UnPBO'd other bike addons, and copied their configs over, and it's not working. The problem lines seems to be:
class Motorcycle: LandVehicle {};
class MyAddonName: Motorcycle
{
.....
}
Whenever I change that to:
//class Motorcycle: LandVehicle {};
class MyAddonName: Jeep
{
.....
}
it seems to work. I also have a config for a second unit in there, and it works properly.
Any hints as to where I could look?
Abs_01
[NOTE: Here is the full 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 AbsAnimations //name of the new class
{
units[] = {Unit1,Unit2}; //new unit to be added
weapons[] = {};
requiredVersion = 1.91 //minimum version of OFP
};
};
class CfgVehicles
{
class All {};
class AllVehicles: All {};
class Land: AllVehicles {};
class LandVehicle: Land {};
class Car: LandVehicle {};
class Motorcycle: LandVehicle {};
class Jeep: Car {};
class Unit1: Jeep
{
vehicleClass="Abs";
displayName = "TwoGH";
model=\Abs_Anim\2gh.p3d;
transportSoldier=2;
side=3;
crew="Civilian2";
maxSpeed=0;
driverAction = ManActAnim1;
cargoAction[]={
ManActAnim2,
ManActAnim3
};
icon="unknown_object";
fuelCapacity=0;
getInRadius = 2.5;
transportAmmo = 0;
transportMaxMagazines = 0;
transportMaxWeapons = 0;
transportFuel = 0;
transportRepair = 0;
transportVehiclesCount = 0;
transportVehiclesMass = 0;
weapons[]={};
magazines[]={};
unloadInCombat = false;
getInAction="ManActGetInCar";
getOutAction="ManActGetOutCar";
castDriverShadow = true;
castCargoShadow = true;
ejectDeadDriver = false;
ejectDeadCargo = true;
class Reflectors {};
};
class Unit2: Motorcycle //This is where I'm having trouble
{
access = ReadOnly;
vehicleClass="Abs";
canFloat = false;
isBicycle = true;
hideWeaponsDriver = false;
displayName="OneGCW";
scope=public;
icon="unknown_object";
maxSpeed=20;
crew = Civilian5;
side = TCivilian;
nameSound="car";
accuracy=0.50;
model=\Abs_Anim\1gcw.p3d;
terrainCoef=6.0;
soundEngine[]={"\Kolo\bc_chain.wav",db-35,1};
weapons[]={BikeHorn};
magazines[]={};
driverAction = ManActKoloDriver;
transportSoldier = 0;
transportAmmo = 0;
}
};
class CfgVehicleActions
{
Anim1="Anim1";
Anim2="Anim2";
Anim3="Anim3";
Anim4="Anim4";
Anim5="Anim5";
};
class CfgMovesMC
{
class Default {};
class DefaultDie: Default {};
class States
{
class Driver: Default {};
class Anim1: Driver
{
file="\Abs_Anim\Anims\Anim1.rtm";
speed=-2;
looped=1;
variantsAI[]={"Anim1V1",0.700000,"Anim1"};
interpolateWith[]={"Anim1V1",0.500000};
equivalentTo="Anim1";
interpolationSpeed=1;
connectTo[]={"Anim1Dying",1};
interpolateTo[]={"Anim1Dying",0.100000};
};
class Anim1V1: Anim1
{
file="\Abs_Anim\Anims\Anim1.rtm";
speed=-4;
looped=1;
interpolateTo[]={"Anim1Dying",0.100000};
};
class Anim1Dying: DefaultDie
{
actions="NoActions";
file="\Abs_Anim\Anims\Anim1smrt.rtm";
speed=-1;
looped=0;
soundEnabled=0;
connectFrom[]={"Anim1Driver",1};
};
class Anim1Dead: Anim1Dying
{
actions="DeadActions";
file="\Abs_Anim\Anims\Anim1smrt2.rtm";
speed=-2.5;
terminal=1;
connectFrom[]={"Anim1Dying",1};
connectTo[]={"DeadState",1};
};
// Anim2
class Anim2: Driver
{
file="\Abs_Anim\Anims\Anim2.rtm";
speed=SPEED_STATIC;
looped=1;
variantsAI[]= {Anim2B,0.7,Anim2};
interpolateWith[]={Anim2,0.5};
equivalentTo=Anim2;
interpolationSpeed=1;
connectTo[]={Anim2dying,1};
}
class Anim2B: Anim2
{
file="\Abs_Anim\Anims\Anim2.rtm";
speed=-5;
looped=1;
}
class Anim2dying: DefaultDie
{
actions = "NoActions";
file="\Abs_Anim\Anims\Anim2smrt.rtm";
speed=-1;
looped=0;
soundEnabled=0;
connectFrom[]={Anim2,1};
};
class Anim2dead: Anim2dying
{
actions = "DeadActions";
file="\Abs_Anim\Anims\Anim2smrt2.rtm";
speed=SPEED_STATIC;
terminal = 1;
connectFrom[]={Anim2dying,1};
connectTo[]={DeadState,1};
};
//Anim3
class Anim3: Driver
{
file="\Abs_Anim\Anims\Anim3.rtm";
speed=SPEED_STATIC;
looped=1;
variantsAI[]= {Anim3B,0.7,Anim3};
interpolateWith[]={Anim3,0.5};
equivalentTo=Anim3;
interpolationSpeed=1;
connectTo[]={Anim3dying,1};
}
class Anim3B: Anim3
{
file="\Abs_Anim\Anims\Anim3.rtm";
speed=-5;
looped=1;
}
class Anim3dying: DefaultDie
{
actions = "NoActions";
file="\Abs_Anim\Anims\Anim3smrt.rtm";
speed=-1;
looped=0;
soundEnabled=0;
connectFrom[]={Anim3,1};
};
class Anim3dead: Anim3dying
{
actions = "DeadActions";
file="\Abs_Anim\Anims\Anim3smrt2.rtm";
speed=SPEED_STATIC;
terminal = 1;
connectFrom[]={Anim3dying,1};
connectTo[]={DeadState,1};
};
//Anim4
class Anim4: Driver
{
file="\Abs_Anim\Anims\Anim4.rtm";
speed=SPEED_STATIC;
looped=1;
variantsAI[]= {Anim4B,0.7,Anim4};
interpolateWith[]={Anim4,0.5};
equivalentTo=Anim4;
interpolationSpeed=1;
connectTo[]={Anim4dying,1};
}
class Anim4B: Anim4
{
file="\Abs_Anim\Anims\Anim4.rtm";
speed=-5;
looped=1;
}
class Anim4dying: DefaultDie
{
actions = "NoActions";
file="\Abs_Anim\Anims\Anim4smrt.rtm";
speed=-1;
looped=0;
soundEnabled=0;
connectFrom[]={Anim4,1};
};
class Anim4dead: Anim4dying
{
actions = "DeadActions";
file="\Abs_Anim\Anims\Anim4smrt2.rtm";
speed=SPEED_STATIC;
terminal = 1;
connectFrom[]={Anim4dying,1};
connectTo[]={DeadState,1};
};
//Anim5
class Anim5: Driver
{
file="\Abs_Anim\Anims\Anim5.rtm";
speed=SPEED_STATIC;
looped=1;
variantsAI[]= {Anim5B,0.7,Anim5};
interpolateWith[]={Anim5,0.5};
equivalentTo=Anim5;
interpolationSpeed=1;
connectTo[]={Anim5dying,1};
}
class Anim5B: Anim5
{
file="\Abs_Anim\Anims\Anim5.rtm";
speed=-5;
looped=1;
}
class Anim5dying: DefaultDie
{
actions = "NoActions";
file="\Abs_Anim\Anims\Anim5smrt.rtm";
speed=-1;
looped=0;
soundEnabled=0;
connectFrom[]={Anim5,1};
};
class Anim5dead: Anim5dying
{
actions = "DeadActions";
file="\Abs_Anim\Anims\Anim5smrt2.rtm";
speed=SPEED_STATIC;
terminal = 1;
connectFrom[]={Anim5dying,1};
connectTo[]={DeadState,1};
};
};
};
class CfgNonAIVehicles // For custom proxies?
{
};