Jump to content
Sign in to follow this  
sfc.itzhak

config issue idf units

Recommended Posts

hey

i am making an apc and for some reason it shows under car in the editor and non of the animation work even the gunners ows wont work or fire...

my tank uses almost the same config and it works great...

the config..

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#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 achzrit

{

units[] = {};

requiredVersion = 1.0;

};

};

#include <CfgSkeletons.h>

class CfgVehicles {

class Land; // External class reference

class LandVehicle : Land {

class NewTurret; // External class reference

class ViewOptics; // External class reference

};

class Tank : LandVehicle {

driverOpticsModel = "\ca\Tracked\optika_tank_driver";

commanderCanSee = 30;

gunnerCanSee = 30;

class HitHull {

armor = 1;

material = 55;

name = "telo";

visual = "telo";

passThrough = 1;

};

class HitLTrack {

armor = 0.15;

material = 55;

name = "pas_L";

visual = "pas_L";

passThrough = 1;

};

class HitRTrack {

armor = 0.15;

material = 55;

name = "pas_P";

visual = "pas_P";

passThrough = 1;

};

class HitEngine {

armor = 0.4;

material = 60;

name = "motor";

visual = "motor";

passThrough = 1;

};

weapons[] = {};

magazines[] = {};

class Turrets {

class MainTurret : NewTurret {

gunnerAction = "ManActTestDriverOut";

gunnerOpticsModel = "\ca\Tracked\optika_tank_gunner";

gunnerOutOpticsModel = "\ca\Weapons\optika_empty";

gunBeg = "usti hlavne";

gunEnd = "konec hlavne";

memoryPointsGetInGunner = "pos driver";

memoryPointsGetInGunnerDir = "pos driver dir";

class HitTurret {

armor = 0.8;

material = 55;

name = "vez";

visual = "vez";

passThrough = 1;

};

class HitGun {

armor = 0.4;

material = 55;

name = "zbran";

visual = "zbran";

passThrough = 1;

};

class Turrets {

class CommanderOptics : NewTurret {

proxyType = "CPCommander";

proxyIndex = 1;

gunnerName = $STR_POSITION_COMMANDER;

primaryGunner = 0;

primaryObserver = 1;

body = "obsTurret";

gun = "obsGun";

animationSourceBody = "obsTurret";

animationSourceGun = "obsGun";

animationSourceHatch = "hatchCommander";

soundServo[] = {"", 0.00316228, 1.0};

gunBeg = "";

gunEnd = "";

minElev = -4;

maxElev = 20;

initElev = 0;

minTurn = -360;

maxTurn = 360;

initTurn = 0;

commanding = 2;

outGunnerMayFire = 1;

inGunnerMayFire = 1;

gunnerOpticsModel = "\ca\Tracked\optika_tank_driver";

gunnerOutOpticsModel = "\ca\Weapons\optika_empty";

gunnerOutOpticsColor[] = {0, 0, 0, 1};

gunnerOutForceOptics = 0;

gunnerOutOpticsShowCursor = 0;

memoryPointGunnerOutOptics = "commander_weapon_view";

memoryPointGunnerOptics = "commanderview";

memoryPointsGetInGunner = "pos driver";

memoryPointsGetInGunnerDir = "pos driver dir";

memoryPointGun = "gun_muzzle";

selectionFireAnim = "zasleh_1";

class ViewOptics {

initAngleX = 0;

minAngleX = -30;

maxAngleX = 30;

initAngleY = 0;

minAngleY = -100;

maxAngleY = 100;

initFov = 0.6;

minFov = 0.6;

maxFov = 0.6;

};

class ViewGunner {

initAngleX = 5;

minAngleX = -30;

maxAngleX = 30;

initAngleY = 0;

minAngleY = 0;

maxAngleY = 0;

initFov = 0.7;

minFov = 0.6;

maxFov = 0.7;

};

};

};

};

};

soundEnviron[] = {"\ca\Tracked\Data\Sound\OldRolling_Treads1", 7.94328, 0.8};

soundEngine[] = {"\ca\Tracked\Data\Sound\OldIdle1", 10.0, 1};

soundCrash[] = {"\ca\Tracked\Data\Sound\crash2", 31.6228, 1};

soundGear[] = {"\ca\Tracked\Data\Sound\Gear_Trans1", 0.01, 1};

soundDammage[] = {"\ca\Tracked\Data\Sound\alarm_loop1", 1.0, 1};

getInAction = "GetInmedium";

getOutAction = "GetOutmediun";

supplyRadius = 1.5;

simulation = "tank";

class ViewOptics : ViewOptics {

initAngleX = 0;

minAngleX = -30;

maxAngleX = 30;

initAngleY = 0;

minAngleY = -100;

maxAngleY = 100;

initFov = 0.9;

minFov = 0.9;

maxFov = 0.9;

};

};

class achzrit : tank

{

displayName = "achzrit";

model = "\achzrit\achzrit.p3d";

selectionLeftOffset = "pasanimL";

selectionRightOffset = "pasanimP";

scope=2;

side = 1;

accuracy = 0.8;

picture = "\ca\tracked\Data\ico\M1_abrams_CA.paa";

Icon = "\Ca\tracked\Data\map_ico\icomap_m1a1_CA.paa";

mapSize = 7;

armor = 900;

nameSound = "APC";

maxSpeed = 60;

hiddenSelections[] = {""};

hiddenSelectionsTextures[] = {""};

transportSoldier = 7;

hasCommander = false;

unloadInCombat = true;

crew = "SoldierWB";

class TransportMagazines {};

transportAmmo = 0;

supplyRadius = 1.7;

cost = 150000;

canFloat = 0;

typicalCargo[] = {"SoldierwCrew", "SoldierwCrew"};

viewCargoShadow = 1;

threat[] = {0.7, 1.0, 0.3};

soundGetIn[] = {"\ca\Tracked\Data\Sound\metal_door2", 0.01, 1};

soundGetOut[] = {"\ca\Tracked\Data\Sound\metal_door2", 0.00316228, 1};

soundEnviron[] = {"\ca\Tracked\Data\Sound\M1A2_track_v2", 5.01187, 1};

soundEngine[] = {"\ca\Tracked\Data\Sound\Brdm_engine_3", 7.94328, 0.9};

driverAction = "BMP2_DriverOut";

driverInAction = "BMP2_Driver";

memoryPointTrack1L = "Stopa ll";

memoryPointTrack1R = "Stopa lr";

memoryPointTrack2L = "Stopa rl";

memoryPointTrack2R = "Stopa rr";

cargoIsCoDriver[] = {0};

cargoAction[] ={"Stryker_Cargo01","Stryker_Cargo01","Stryker_Cargo01","Stryker_Cargo01","Stryker_Cargo01","Stryker_Cargo01","Stryker_Cargo01","BMP2_Commander"};

driverForceOptics = 0;

class Turrets

{

class MainTurret : NewTurret

{

body = "OtocVez";

gun = "OtocHlaven";

animationSourceBody = "mainTurret";

animationSourceGun = "mainGun";

animationSourceHatch = "hatchGunner";

class HitTurret

{

armor = 0.8;

material = 55;

name = "vez";

visual = "vez";

passThrough = true;

};

class HitGun

{

armor = 0.4;

material = 55;

name = "zbran";

visual = "zbran";

passThrough = true;

};

weapons[] = {M240_veh};

magazines[] = {"1200Rnd_762x51_M240"};

soundServo[] = {"\ca\Weapons\Data\Sound\gun_elevate", 0.001, 1.0};

minElev = -4;

maxElev = 33;

minTurn = -360;

maxTurn = 360;

gunnerAction = "BMP2_GunnerOut";

gunnerInAction = "BMP2_Gunner";

forceHideGunner = 0;

gunnerOpticsModel = "\ca\Tracked\optika_M1A1_gunner";

gunnerForceOptics = false;

gunnerOutOpticsModel = "\ca\weapons\optika_empty";

};

};

};

};

the CfgSkeletons.h

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

{

class Tank; //Define base class.

class achzritBones : tank

{

isDiscrete=1;

skeletonInherit = ""; //Inherit all bones from class Car.

skeletonBones[]=

{

"levy predni","",

"levy dalsi","",

"levy prostredni","",

"levy zadni","",

"pravy predni","",

"pravy dalsi","",

"pravy prostredni","",

"pravy zadni","",

"OtocVez","",

"OtocHlaven","OtocVez",

"kolol1","",

"kolol2","",

"kolol3","",

"kolol4","",

"kolol5","",

"kolol6","",

"koll1","",

"koll2","",

"kolop1","",

"kolop2","",

"kolop3","",

"kolop4","",

"kolop5","",

"kolop6","",

"kolp1","",

"kolp2",""

};

};

};

class CfgModels

{

class Tank; //Declare base class.

class achzrit: tank

{

sectionsInherit = "";

sections[] ={"pas_P","koll1","koll2","kolp1","kolp2","koloL1","koloL2","koloL3","koloL4","koloL5","koloL6","kolP1","koloP1","koloP2","koloP3","koloP4","koloP5","koloP6","pravy zadni","pasanimL","pasanimP","levy zadni","L svetlo", "P svetlo"};

skeletonName = "achzritBones";

class Animations

{

class OtocVez

{

type = "rotationY";

source = "mainTurret";

selection = "OtocVez";

axis = "OsaVeze";

memory = true;

sourceAddress = "loop";

minValue = rad -360;

maxValue = rad +360;

angle0 = rad -360;

angle1 = "rad 360";

};

class OtocHlaven

{

type = "rotationX";

source = "mainGun";

selection = "OtocHlaven";

axis = "OsaHlavne";

memory = true;

sourceAddress = "clamp";

minValue = "rad -4.5";

maxValue = "rad 35";

angle0 = "rad -5.5";

angle1 = "rad 35";

};

class achkoloL1

{

type = "rotationX";

source = "wheelL";

selection = "kolol1";

axis = "";

memory = true;

sourceAddress = "loop";

minValue = 0;

maxValue = 1;

angle0 = 0;

angle1 = "rad -360";

};

class achkoloL2 :achkoloL1

{

selection = "kolol2";

};

class achkoloL3 :achkoloL1

{

selection = "kolol3";

};

class achkoloL4 :achkoloL1

{

selection = "kolol4";

};

class achkoloL5 :achkoloL1

{

selection = "kolol5";

};

class achkoloL6 :achkoloL1

{

selection = "kolol6";

};

class achkoll1 :achkoloL1

{

selection = "koll1";

};

class achkoll2 :achkoloL1

{

selection = "koll2";

};

class achkolop1

{

type = "rotationX";

source = "wheelr";

selection = "kolop1";

axis = "";

memory = true;

sourceAddress = "loop";

minValue = 0;

maxValue = 1;

angle0 = 0;

angle1 = "rad -360";

};

class achkolop2 :achkolop1

{

selection = "kolop2";

};

class achkolop3 :achkolop1

{

selection = "kolop3";

};

class achkolop4 :achkolop1

{

selection = "kolop4";

};

class achkolop5 :achkolop1

{

selection = "kolop5";

};

class achkolop6 :achkolop1

{

selection = "kolop6";

};

class achkolop7 :achkolop1

{

selection = "kolop7";

};

class achkolop8 :achkolop1

{

selection = "kolop8";

};

class achkolop9 :achkolop1

{

selection = "kolop9";

};

class achkolp1 :achkolop1

{

selection = "kolp1";

};

class achkolp2 :achkolop1

{

selection = "kolp2";

};

class mkDrivingWheel

{

type = "rotationZ";

source = "drivingWheel";

selection = "volant";

axis = "osavolantkon";

memory = true;

sourceAddress = "mirror";

minValue = -1;

maxValue = 1;

angle0 = "rad -35";

angle1 = "rad 35";

};

};

};

};

thanks in advance..

Share this post


Link to post
Share on other sites

I see several issues:

a) why do you have the whole class Tank in that config, you risk overwriting unintentionally Armas configs for that class.

b) you have a mess with closing brackets in your tank definition where the turret definition ends, it seems.

Actually it appears that closes whole class cfgVehicles, which would make your apc definition afterwards not be used at all.

b) Since it might be that any other addon as well messes around in that class you can force for your addon to show in the tank class by adding the line

vehicleClass="Armored";

Share this post


Link to post
Share on other sites
Quote[/b] ]vehicleClass="Armored";

could you give an example of config using the definition above?

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  

×