I'm currently making this WWII LMC(3) type landing craft:
The first problem I'm having with it as you can see the .50 cal M2's once it's late evening display that they are constantly firing when they are not.
Second problem: Can't get turrets to move...they fire, but won't move.
Third problem: ***Gunner's positions are both named "S" in action menu when you go to move from drivers, cargo or other gunner's position.
Fourth problem: ***I HAVE ABSOLUTELY NO CLUE WHAT I'M DOING...HELP!!!! ***
I took the config.cpp and model.cfg as a template and hacked it together somewhat using my p3d model to get it into the game...haha. ***Ya I know what you're thinking...NOOB! right. ***Anyway. ***I've looked and looked around, searched tons of sites and I really haven't found anything out there that will help me in my quest, so I'm asking here. ***I've seen some mutiple turret examples out there that just don't make sense to me. ***So is there anybody out there that can help me tweak this config.cpp and model.cfg?
Here's what I want to do:
1. Create my own class. ***Right now if you plop this into the game it shows up under the "ship" class and replaces one of the RHIB's. I would like to call my class "rip31st". ***I don't want any other vehicles in my class, just this one. ***Right now there's four total as you will see in the config.cpp below.
2. Get both turrets to work and rotate. ***I'm trying to figure this out and I've been racking my head on the wall ******doing it. ***I just don't see where stuff lines up in the config.cpp and model.cfg to make it all happen. ***I'm probably missing some minor overlooked detail.
3. Get the gunner's names right. ***As stated about they come out as "S" in game. ***ie. "get into "S" " position. ***You can clearly see in my config.cpp they are named left and right gunners.
4. ***Fix the look of the M2's firing all the time. ***This only happens when it's dawn, dusk or night. ***Doesn't happen duing the day. ***
config.cpp ( or as I call it...headache.cpp ******):
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
class CfgPatches
{
class CAWater
{
units[] =
{
"Zodiac","RHIB","rip31st_lcm3& #34;,"PBX"
};
weapons[] = {};
requiredVersion = 0.10;
requiredAddons[] = {"CAData","CACharacters","CAWe apons","CA_Anims_Char"};
};
};
#define mag_xx(a,b) class _xx_##a {magazine = a; count = b;}
#define weap_xx(a,b) class _xx_##a {weapon = a; count = b;}
#define DefaultWestMagazines(x) \
class TransportMagazines \
{ \
mag_xx(30Rnd_556x45_Stanag,30*x); \
mag_xx(200Rnd_556x45_M249,5*x); \
mag_xx(HandGrenadeTimed,10*x); \
mag_xx(5Rnd_762x51_M24,10*x); \
mag_xx(15rnd_9x19_M9,15*x); \
mag_xx(M136,3*x); \
mag_xx(1Rnd_HE_M203,3*x); \
};
#define DefaultEastMagazines(x) \
class TransportMagazines \
{ \
mag_xx(30Rnd_545x39_AK,30*x); \
mag_xx(100Rnd_762x54_PK,5*x); \
mag_xx(8Rnd_9x18_Makarov,20*x); \
mag_xx(HandGrenade,10*x); \
mag_xx(10Rnd_762x54_SVD,10*x); \
mag_xx(PG7VR,3*x); \
mag_xx(1Rnd_HE_GP25,3*x); \
};
#define DefaultGuerMagazines(x) \
class TransportMagazines \
{ \
mag_xx(30Rnd_556x45_Stanag,30*x); \
mag_xx(30Rnd_9x19_MP5,15*x); \
mag_xx(HandGrenade,10*x); \
mag_xx(100Rnd_762x51_M240,5*x); \
mag_xx(15rnd_9x19_M9,15*x); \
mag_xx(M136,3*x); \
mag_xx(1Rnd_HE_M203,3*x); \
};
#include "basicDefines.hpp"
#include "CrewAnimations.hpp"
class CfgVehicles
{
class AllVehicles;
class Ship: AllVehicles
{
unitInfoType=UnitInfoCar; //By default no hud information
class HitEngine {armor=1.2;material=60;name="motor";visual ="motor";passThrough=1;}
class NewTurret;
class Turrets;
nameSound = "boat";
enableGPS = false;
class MarkerLights
{
class RedStill
{
name = "cerveny pozicni";
color[] = {1.0, 0.1, 0.1, 1};
ambient[] = {0.1, 0.01, 0.01, 1};
brightness = 0.01;
blinking = false;
};
class GreenStill
{
name = "zeleny pozicni";
color[] = {0.1, 1.0, 0.1, 1};
ambient[] = {0.01, 0.1, 0.01, 1};
brightness = 0.01;
blinking = false;
};
class WhiteStill
{
name = "bily pozicni";
color[] = {1.0, 1.0, 1.0, 1};
ambient[] = {0.1, 0.1, 0.1, 1};
brightness = 0.01;
blinking = false;
};
};
precision=10;
};
class Boat: Ship
{
// boats are quite able to maneuver precisely and brake fast
precision=6;
brakeDistance=20;
};
class RHIB: Boat
{
scope=2;
displayName=$STR_DN_RHIB;
accuracy=0.50;
crew = SoldierWB;
side=TWest;
model="\ca\water\rhib";
picture="\ca\water\data\ico	 2;rhib_CA.paa";
Icon="\Ca\water\Data\map_ico&# 92;icomap_RHIB_CA.paa";
mapSize = 8;
unitInfoType=UnitInfoShip;
soundEngine[] = {\ca\Water\Data\Sound\RHIB_1 , db18, 0.8};
soundEnviron[] = {\ca\Water\Data\Sound\Water_v5 , db-45, 1.0};
driverAction = RHIB_Driver;
cargoAction[] = {RHIB_Cargo};
hasGunner = true;
castDriverShadow=true;
castCargoShadow=true;
gunnerHasFlares = false;
maxSpeed=60;
enableGPS = true;
transportSoldier = 10;
typicalCargo[]={SoldierWB,SoldierWAT};
supplyRadius = 3;
class Exhausts
{
class Exhaust1
{
position = "vyfuk start";
direction = "vyfuk konec";
effect = "";
};
};
DefaultWestMagazines(1)
cost=10000;
armor=30;
class AnimationSources
{
class belt_rotation
{
source="reload";
weapon="M2";
};
};
class Turrets: Turrets
{
class MainTurret: NewTurret
{
class HitTurret {armor=0.8;material=60;name="vez";visual=& #34;vez";passThrough=1;};
class HitGun {armor=0.6;material=60;name="zbran";visual ="zbran";passThrough=1;};
body = "MainTurret";
gun = "MainGun";
animationSourceBody = "mainTurret";
animationSourceGun = "mainGun";
gunnerAction = RHIB_Gunner;
ejectDeadGunner = true;
outGunnerMayFire = 1;
inGunnerMayFire = 0;
minElev=-25; maxElev=+60; initElev=5;
minTurn=-135; maxTurn=135; initTurn=0;
soundServo[]={,db-40,1.0};
gunBeg = "usti hlavne"; //gunBeg = endpoint of the gun
gunEnd = "konec hlavne"; //gunEnd = chamber of the gun
weapons[]={M2};
magazines[]={100Rnd_127x99_M2,100Rnd_127x9 9_M2,100Rnd_127x99_M2};
gunnerName = $STR_POSITION_RIGHTGUNNER;
gunnerOpticsModel = "\ca\weapons\optika_empty";
gunnerForceOptics = 0;
startEngine = 0;
class ViewOptics
{
initAngleX=0; minAngleX=-30; maxAngleX=+30;
initAngleY=0; minAngleY=-100; maxAngleY=+100;
initFov=0.42; minFov=0.22; maxFov=0.64;
};
class ViewGunner
{
initAngleX=5; minAngleX=-30; maxAngleX=+30;
initAngleY=0; minAngleY=0; maxAngleY=0;
initFov=0.42; minFov=0.22; maxFov=0.95;
};
};
};
class Library
{
*** libTextDesc = $STR_LIB_RHIB;
};
extCameraPosition[]={0,4.0,-14.0};
class Damage
{
tex[]={};
mat[]={
"ca\water\data\rhib.rvmat",
"ca\water\data\rhib.rvmat",
"ca\water\data\rhib_destruct.rvmat ",
"ca\water\data\rhib_dash.rvmat" ;,
"ca\water\data\rhib_dash.rvmat" ;,
"ca\water\data\rhib_dash_destruct. rvmat"
};
};
};
class rip31st_lcm3: RHIB
{
displayName="WW2 LCM(3) Landing Craft";
model="\rip31st_lcm3\rip31st_lcm3" ;
transportSoldier = 62;
class Turrets: Turrets
{
class MainTurret: MainTurret {};
class BackTurret: MainTurret
{
body = "Turret_2";
gun = "Gun_2";
animationSourceBody = "Turret_2";
animationSourceGun = "Gun_2";
animationSourceHatch = "";
selectionFireAnim = "zasleh_1";
proxyIndex = 2;
gunnerName = $STR_POSITION_LEFTGUNNER;
commanding = -2;
gunnerOpticsModel = "\ca\weapons\optika_empty";
minElev=-50; maxElev=+25; initElev=-5;
minTurn=120; maxTurn=240; initTurn=180;
weapons[]={M2};
magazines[]={100Rnd_127x99_M2,100Rnd_127x9 9_M2,100Rnd_127x99_M2};
gunBeg = "usti hlavne_1"; //gunBeg = endpoint of the gun
gunEnd = "konec hlavne_1"; //gunEnd = chamber of the gun
primaryGunner = 0;
primary = 0;
memoryPointGun = "kulas_1";
memoryPointGunnerOptics= "gunnerview_1";
};
};
class Damage
{
tex[]={};
mat[]={
"ca\water\data\rhib.rvmat",
"ca\water\data\rhib.rvmat",
"ca\water\data\rhib_destruct.rvmat ",
"ca\water\data\rhib_dash.rvmat" ;,
"ca\water\data\rhib_dash.rvmat" ;,
"ca\water\data\rhib_dash_destruct. rvmat"
};
};
};
class Zodiac: Boat
{
scope=2;
side = 1;
displayName=$STR_DN_ZODIAC;
accuracy=0.50;
crew = SoldierWB;
model="\ca\water\zodiac";
picture="\ca\water\data\ico	 2;zodiac_CA.paa";
Icon="\Ca\water\Data\map_ico&# 92;icomap_rubber_CA.paa";
mapSize = 6;
soundEngine[] = {\ca\Water\Data\Sound\Zodiac_e ngine_v1, db10, 1.0};
soundEnviron[] = {\ca\Water\Data\Sound\Water_v5 _best, db-45, 0.95};
driverAction = Zodiac_Driver;
cargoAction[] = {Zodiac_Cargo01,Zodiac_Cargo02,Zodiac_Cargo03,Zodi ac_Cargo04};
castDriverShadow=true;
castCargoShadow=true;
ejectDeadCargo = true;
ejectDeadDriver = true;
hasGunner = 0;
class Turrets {};
maxSpeed=60;
transportSoldier = 4;
typicalCargo[]={SoldierWB,SoldierWAT};
class Exhausts
{
class Exhaust1
{
position = "vyfuk start";
direction = "vyfuk konec";
effect = "";
};
};
supplyRadius = 2;
class DestructionEffects
{};
DefaultWestMagazines(1)
cost=10000;
armor=20;
class Library
{
*** libTextDesc = $STR_LIB_ZODIAC;
};
// quite small, no need to have camera very far
extCameraPosition[]={0,1.5,-4.0};
class Damage
{
tex[]={};
mat[]={
"ca\water\data\zodiac_engine.rvmat ",
"ca\water\data\zodiac_engine.rvmat ",
"ca\water\data\zodiac_engine_destr uct.rvmat",
"ca\water\data\zodiac_guma.rvmat&# 34;,
"ca\water\data\zodiac_guma.rvmat&# 34;,
"ca\water\data\zodiac_guma_destruc t.rvmat",
"ca\water\data\zodiac_gumb.rvmat&# 34;,
"ca\water\data\zodiac_gumb.rvmat&# 34;,
"ca\water\data\zodiac_gumb_destruc t.rvmat",
"ca\water\data\zodiac_trup.rvmat&# 34;,
"ca\water\data\zodiac_trup.rvmat&# 34;,
"ca\water\data\zodiac_trup_destruc t.rvmat"
};
};
};
class Zodiac2: Zodiac
{
displayName=$STR_DN_ZODIAC_RACS;
side = 2;
crew = SoldierGB;
typicalCargo[]={SoldierGB,SoldierGAT};
};
class PBX: Zodiac
{
displayName=$STR_DN_BOAT;
model="\ca\water\PBX";
picture="\ca\water\data\ico	 2;pbx_CA.paa";
Icon="\Ca\water\Data\map_ico&# 92;icomap_rubber_CA.paa";
mapSize = 6;
scope=2;
transportSoldier = 3;
typicalCargo[]={SoldierEB,SoldierEAT};
driverAction = PBX_Driver;
cargoAction[] = {PBX_Cargo01,PBX_Cargo02,PBX_Cargo03};
side=TEast;
maxSpeed=65;
crew = SoldierEB;
DefaultEastMagazines(1)
class Library
{
*** libTextDesc = $STR_LIB_BOAT;
};
extCameraPosition[]={0,4.0,-14.0};
class Damage
{
tex[]={};
mat[]={
"ca\water\data\pbx_engine.rvmat 4;,
"ca\water\data\pbx_engine.rvmat 4;,
"ca\water\data\pbx_engine_destruct .rvmat",
"ca\water\data\pbx_01.rvmat" ;,
"ca\water\data\pbx_01.rvmat" ;,
"ca\water\data\pbx_01_destruct.rvm at",
"ca\water\data\pbx_02.rvmat" ;,
"ca\water\data\pbx_02.rvmat" ;,
"ca\water\data\pbx_02_destruct.rvm at"
};
};
};
};
class CfgNonAIVehicles
{
class ProxyFlag;
class ProxyFlag_Auto: ProxyFlag {model = "\ca\water\flag_auto";}
class ProxyFlag_Alone: ProxyFlag {model = "\ca\water\flag_alone";}
class ProxyFlag_Alone_Big: ProxyFlag {model = "\ca\water\flag_alone_big"; }
};
[/QUOTE]
and the model.cfg:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
class CfgSkeletons
{
class Vehicle;
class Ship: Vehicle
{
skeletonInherit="Vehicle";
skeletonBones[]=
{
"otocvez",
"",
"otochlaven",
"otocvez",
"volant",
"",
"radar",
""
};
};
class Rhib: Ship
{
skeletonInherit="Ship";
skeletonBones[]=
{
"kompas",
"",
"fuel",
"",
"hodinova",
"",
"minutova",
"",
"mph",
"",
"rpm",
"",
"rpm2",
"",
"ammo_box",
"OtocHlaven",
"ammo_belt",
"OtocHlaven"
};
};
class rip31st_lcm3: Ship
{
skeletonInherit="Rhib";
skeletonBones[]=
{
"otocvez_1",
"",
"otochlaven_1",
"otocvez_1"
};
};
class Zodiac: Ship
{
skeletonInherit="Ship";
skeletonBones[]=
{
"vrtule",
"volant"
};
};
};
class Rotation;
class CfgModels
{
class Default;
class Ship: Default
{
sectionsInherit="Vehicle";
sections[]=
{
"zadni svetlo",
"motor",
"zbran",
"vez"
};
skeletonName="Ship";
class Animations
{
class Radar
{
type="rotation";
source="time";
selection="radar";
axis="osa radaru";
minValue=0;
maxValue=12.500000;
sourceAddress="loop";
angle0=0;
angle1="rad 360";
};
class DrivingWheel
{
type="rotation";
source="drivingWheel";
selection="volant";
begin="osaVolantZac";
end="osaVolantKon";
memory="false";
minValue=-1;
maxValue=1;
angle0=2;
angle1=-2;
};
};
};
class Zodiac: Ship
{
skeletonName="Zodiac";
class Animations
{
class vrtule: Rotation
{
type="rotation";
source="rotor";
selection="vrtule";
axis="osa vrtule";
sourceAddress="loop";
angle0=0.000000;
angle1=62.831852;
};
};
};
class PBX: Zodiac
{
};
class RHIB: Ship
{
skeletonName="rhib";
class Animations: Animations
{
class MainTurret
{
type="rotationY";
source="mainTurret";
selection="OtocVez";
axis="OsaVeze";
animPeriod=0;
minValue="rad -360";
maxValue="rad +360";
angle0="rad -360";
angle1="rad +360";
};
class MainGun: MainTurret
{
type="rotationX";
source="mainGun";
selection="OtocHlaven";
axis="OsaHlavne";
};
class IndicatorCompass: Rotation
{
source="direction";
selection="kompas";
axis="osa_kompas";
memory=0;
minValue=-3.141590;
maxValue=3.141590;
angle0=-3.141593;
angle1=3.141593;
};
class fuel: Rotation
{
source="fuel";
selection="fuel";
axis="osa_fuel";
memory=0;
angle0=2.007129;
angle1=0.000000;
};
class hodinova: Rotation
{
source="clockHour";
selection="hodinova";
axis="osa_time";
memory=0;
angle0=0.000000;
angle1=6.283185;
};
class minutova: Rotation
{
source="clockMinute";
selection="minutova";
axis="osa_time";
memory=0;
angle0=0.000000;
angle1=6.283185;
};
class mph: Rotation
{
source="speed";
selection="mph";
axis="osa_mph";
memory=0;
angle0=0.000000;
angle1=4.712389;
};
class rpm: Rotation
{
source="rpm";
selection="rpm";
axis="osa_rpm";
memory=0;
angle0=0.000000;
angle1=4.712389;
};
class rpm2: rpm
{
selection="rpm2";
axis="osa_rpm2";
memory=0;
};
class DrivingWheel: DrivingWheel
{
angle0=-2.000147;
angle1=2.000147;
};
class ammo_belt_rotation
{
type="rotationZ";
source="belt_rotation";
selection="ammo_belt";
axis="ammo_belt_axis";
memory=1;
sourceAddress="loop";
minValue=0.000000;
maxValue=0.010000;
angle0=0.000000;
angle1=-0.209440;
};
};
};
class rip31st_lcm3: RHIB
{
sectionsInherit="Ship";
sections[]=
{
"zasleh_1"
};
skeletonName="Ship2Turrets";
class Animations: Animations
{
class Turret_2: MainTurret
{
source="Turret_2";
selection="OtocVez_1";
axis="OsaVeze_1";
};
class Gun_2: MainGun
{
source="Gun_2";
selection="OtocHlaven_1";
axis="OsaHlavne_1";
};
};
};
};
[/QUOTE]
So fire away ****** I'm open for constructive critisism. ***
And as always I'm thankful for all the help I get from the code gurus ***![]()
thx!
HOME 



***doing it. ***I just don't see where stuff lines up in the config.cpp and model.cfg to make it all happen. ***I'm probably missing some minor overlooked detail.
***):
*** I'm open for constructive critisism. ***
Reply With Quote
