Home   Help Search Login Register  

Author Topic: Armed car without gunner? is it possible?  (Read 2131 times)

0 Members and 1 Guest are viewing this topic.

Offline burnie222

  • Members
  • *
Armed car without gunner? is it possible?
« on: 25 Apr 2010, 05:58:47 »
hello, im trying to make a car, as in the movie Death Race... where the driver controls the weapons. is it possible in arma2?

i made a few cars for arma1, and they worked perfectly with the manual fire command... but i dont see it in arma2.

so it would be great if any of you have some tips :)

ive attached a pic of the car im working on.
anyway, heres my config:

Code: [Select]
//--------------------------------


#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 brncamaro68
        {
          units[] = {brncamaro68};
          weapons[] = {};
          requiredVersion = 1.00;
        };
};


class CfgSkeletons
{
   class car;
   class brncamaro68: car
   {
isDiscrete=1;
skeletonInherit = "";
skeletonBones[]=
{
"damageHide","",
"drivewheel","",
"rightwiper","",
"leftwiper","",
"trunk","",
"hood","",
"covers", "",
"aniantenna","",
"gas","",
"mph","",
"rpm","",
"oil","",
"fan","",
"engine","",
"frontleftdoor","",
"frontrightdoor","",
"leftreardoor","",
"rightreardoor","",
"wheel_1_damper","",
"wheel_1_steering","wheel_1_damper",
"wheel_1","wheel_1_steering",
"wheel_1_Damage","wheel_1",

"wheel_2_damper","",
"wheel_2_steering","wheel_2_damper",
"wheel_2","wheel_2_steering",
"wheel_2_Damage","wheel_2",

"wheel_3_damper","",
"wheel_3","wheel_3_damper",
"wheel_3_Damage","wheel_3",

"wheel_4_damper","",
"wheel_4","wheel_4_damper",
"wheel_4_Damage","wheel_4"

};
   };
};


class CfgModels
{
class default{};
class Vehicle: Default
{
sectionsInherit="";
sections[] = {"cislo","grupa","side","sektor","clan","podsvit pristroju","poskozeni","L svetlo","P svetlo","zasleh"};
};

class Car: Vehicle
{
sectionsInherit="Vehicle";
sections[]=
{
"ammo",
"sklo predni p",
"sklo predni l",
"zadni svetlo",
"brzdove svetlo"
};
};


class brncamaro68: Car
{
skeletonName = "brncamaro68";
sectionsInherit="car";
sections[]=
{
"light_1_1",
"light_1_2",
"light_2_1",
"light_2_2",
"PI svetlo",
"zbytek",
};
class animations

{

class damageHide
{
type="hide";
source="damage";
selection="damageHide";
};
class Hood_damage: damageHide
{
selection="hood";
};
class Aerial_damage: damageHide
{
selection="aerial";
};
class MirrorHide_damage: damageHide
{
selection="MirrorHide";
};
class CBHide_damage: damageHide
{
selection="CBHide";
};
class wheel_1_Damage: damageHide
{
selection="wheel_1_Damage";
};
class wheel_2_Damage: damageHide
{
selection="wheel_2_Damage";
};
class wheel_3_Damage: damageHide
{
selection="wheel_3_Damage";
};
class wheel_4_Damage: damageHide
{
selection="wheel_4_Damage";
};
class destruct_heigh_ppt
{
type="translation";
source="damage";
selection="wheel_1_damper";
axis="land_move_axis";
memory=1;
minValue=0.999999;
maxValue=1.000000;
offset0=0;
offset1=-0.280000;
};
class destruct_heigh_pdt: destruct_heigh_ppt
{
selection="wheel_2_damper";
};
class destruct_heigh_pprt: destruct_heigh_ppt
{
selection="wheel_3_damper";
offset1=-0.380000;
};
class destruct_heigh_pzt: destruct_heigh_ppt
{
selection="wheel_4_damper";
offset1=-0.380000;
};
class DrivingWheel
{
type = "rotation";
source="drivingWheel";
selection="drivewheel";
axis="drivewheel_axis";
minValue=-1;
maxValue=1;
angle0=4;
angle1=-4;
};
class Steering_1_1
{
type="rotationY";
source="drivingWheel";
selection="wheel_1_steering";
axis="wheel_1_steering_axis";
memory=1;
minValue="rad -90";
maxValue="rad +90";
angle0=1.047198;
angle1=-1.047198;
};
class Steering_1_2: Steering_1_1
{
selection="wheel_2_steering";
axis="wheel_2_steering_axis";
angle0=1.047198;
angle1=-1.047198;
};
class Wheel_1_1
{
type="rotationX";
source="wheel";
selection="wheel_1";
axis="";
memory=1;
sourceAddress="loop";
minValue=0;
maxValue=1;
angle0=0;
angle1="rad -360";
};
class Wheel_1_2: Wheel_1_1
{
selection="wheel_2";
};
class Wheel_2_1: Wheel_1_1
{
selection="wheel_3";
};
class Wheel_2_2: Wheel_1_1
{
selection="wheel_4";
};
class Wheel_1_1_Damper
{
type="translationY";
source="damper";
selection="wheel_1_damper";
axis="";
minValue=-0.090000;
maxValue=1;
memory=1;
};
class Wheel_1_2_Damper: Wheel_1_1_Damper
{
selection="wheel_2_damper";
};
class Wheel_2_1_Damper: Wheel_1_1_Damper
{
selection="wheel_3_damper";
};
class Wheel_2_2_Damper: Wheel_1_1_Damper
{
selection="wheel_4_damper";
};
// dials
class IndicatorSpeed
{
type = "rotation";
source="speed";
selection="mph";
axis="axis_mph";
memory=1;
maxValue=38.900002;
angle0=0;
angle1="rad -270";
};
class IndicatorRPM
{
type = "rotation";
source="rpm";
selection="rpm";
axis="axis_rpm";
memory=1;
minValue = 0;
maxValue = 1;
angle0=0;
angle1="rad -160";
};
class LightCovers
{
type="translation";
source="TwoSecondAnim";
selection="covers";
axis="land_move_axis";
memory=1;
minValue=0.999999;
maxValue=1.000000;
offset0=0;
offset1=0.27000;
};


// class FanRPM
// {
// type = "rotation";
// source= "time";
// selection="fan";
// sourceAddress = "1";
// axis="fan_axis";
// memory=1;
// minValue = 0;
// maxValue = 1;
// angle0=0.000000;
// angle1="rad +360";
// };
};
};
};

class CfgVehicleClasses
{
class brnDeathracing
{
displayName = "Death Racing";
};
};

class CfgVehicles
{
class All{};
class AllVehicles: All{};
class Land: AllVehicles{};
class LandVehicle: Land{class NewTurret;};
class Car: LandVehicle{
class Turrets
{
class MainTurret : NewTurret
{
memoryPointGun = "machinegun";
body = "";
gun = "";
gunBeg = "usti hlavne"; //gunBeg = endpoint of the gun
gunEnd = "konec hlavne"; //gunEnd = chamber of the gun
soundServo[]={\ca\wheeled\Data\Sound\servo3, db-50, 1.0};
minElev = -5; maxElev = +40;
minTurn = -360; maxTurn = +360;
hasGunner= 0;
startEngine = 0;
class HitTurret {armor=0.8;material=51;name="vez";visual="vez";passThrough=0;};
class HitGun {armor=0.4;material=52;name="zbran";visual="zbran";passThrough=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 Landrover: Car
{
class Exhausts;
class AnimationSources;
};
class brncamaro68: Landrover
{
vehicleClass="brndeathracing";
scope=public;
crew="Civilian12";
displayName="68 Camaro";
nameSound="car";
unloadInCombat = false;
maxSpeed=581;
side=TCivilian;
accuracy=0.50;
armorWheels=0.07;
armor=60; // total armor
armorStructural=6.0; // very low structural damage
armorEngine=1.6;
brakeDistance=10;
turnCoef=6.750000;
//terrainCoef=3.000000;
terrainCoef=0.500000;
cost=30000;
fuelCapacity=70;
memoryPointGun = "machinegun";
hasGunner = false;

class Turrets: Turrets
{
class MainTurret: MainTurret
{
body = "mainTurret";
gun = "mainGun";
hasGunner=0;
weapons[] = {M134,FFARLauncher};
driverAction = Skodovka_Cargo01;
magazines[] = {4000Rnd_762x51_M134,14Rnd_FFAR};
ejectDeadGunner = true;
castGunnerShadow = 0;
};
};

transportSoldier = 0;
driverIsCommander = true;
transportMaxMagazines=15;
transportMaxWeapons=5;

selectionBrakeLights="brzdove svetlo";
selectionBackLights="zadni svetlo";

dammageHalf[]=
{
\ranha\windows.paa, \ca\wheeled\data\LandRover_03br1_CA.paa,
\ranha\windows.paa, \ca\wheeled\data\LandRover_03br1_CA.paa
};
dammageFull[]=
{
\ranha\windows.paa, \ca\wheeled\data\LandRover_03br2_CA.paa,
\ranha\windows.paa, \ca\wheeled\data\LandRover_03br2_CA.paa
};

class Exhausts
{
class exhaust1
{
position = "vyfuk start";
direction = "vyfuk konec";
effect ="ExhaustsEffect";

};
class exhaust2:exhaust1
{
position = "vyfuk start 2";
direction = "vyfuk konec 2";

};
};
class Library {libTextDesc = "A car from Death Racing mod.";};
class Reflectors
{
class Left
{
color[]={0.900000,0.800000,0.800000,1.000000};
ambient[]={0.100000,0.100000,0.100000,1.000000};
position="Light_1_1_source";
direction="Light_1_1_target";
hitpoint="Light_1_1";
selection="Light_1_1";
size=0.500000;
brightness=0.500000;
};
class Right
{
color[]={0.900000,0.800000,0.800000,1.000000};
ambient[]={0.100000,0.100000,0.100000,1.000000};
position="Light_1_2_source";
direction="Light_1_2_target";
hitpoint="Light_1_2";
selection="Light_1_2";
size=0.500000;
brightness=0.500000;
};
};

model=\brncamaro68\brncamaro68.p3d;


cargoIsCoDriver[] = {true,false};
soundEngine[]={"\brncamaro68\motor.wav",1,1 };
soundGear[]={"\brncamaro68\shifter.wav",0.00562,1 };
typicalCargo[]={};

class AnimationSources: AnimationSources
{
class  TwoSecondAnim // Should be the same as your selection name.
{
source = "user"; //The controller is defined as a user animation.
animPeriod = 2;  //The animation period used for this controller.
initPhase=0;     //Initial phase when object is created. 0 = CLOSED
};
};

class HitEngine  {armor = 0.4;material = 60;name = "motor";visual = "motor";passThrough = 1;};
   class HitBody    {armor = 1;material = 51;name = "karoserie";visual = "karoserie";passThrough = 1;};
   class HitFuel    {armor = 0.3;material = 51;name = "palivo";passThrough = 1;};
class HitLFWheel {armor=0.38;material=-1;name="wheel_1_damper";visual="wheel_1";passThrough=0;};
class HitRFWheel {armor=0.38;material=-1;name="wheel_2_damper";visual="wheel_2";passThrough=0;};
class HitLBWheel {armor=0.38;material=-1;name="wheel_3_damper";visual="wheel_3";passThrough=0;};
class HitRBWheel {armor=0.38;material=-1;name="wheel_4_damper";visual="wheel_4";passThrough=0;};



class TransportWeapons
{
};




  };

};

#EDIT: Code tags added..    h-
« Last Edit: 25 Apr 2010, 09:39:59 by h- »

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: Armed car without gunner? is it possible?
« Reply #1 on: 25 Apr 2010, 09:51:56 »


 you can try   enableManualFire = 1;   before class turrets .

 also in Arma2  the skeleton and modelcfg  , should now be in seprerate file called Model.cfg   pbo should be Binarised using BinPbo  from Bis tools .

I love ofp

Offline burnie222

  • Members
  • *
Re: Armed car without gunner? is it possible?
« Reply #2 on: 25 Apr 2010, 22:59:58 »
i tried adding enableManualFire = 1; in config file as you said, but still didnt work.

thanks for the reply tho ;)

anyone know how to make this work? :\

//edit

ok, i tried copying the weapons[] = {M134,FFARLauncher}; and magazines[] = {4000Rnd_762x51_M134,14Rnd_FFAR}; to the main class instead of the turret. this made it possible to shoot the weapons while in driver seat, however... the bullets came from under the car, instead of from my memory lod. also, the zasleh on the gun wont work in driver seat.

anyone have any tips? :\
« Last Edit: 25 Apr 2010, 23:43:47 by burnie222 »

Offline arremba

  • Members
  • *
Re: Armed car without gunner? is it possible?
« Reply #3 on: 27 Apr 2010, 10:35:49 »
hasGunner=0; change in hasGunner=1;
bie

Offline Gnat

  • Addons Depot
  • Former Staff
  • ****
  • I Bite!
    • Gnats
Re: Armed car without gunner? is it possible?
« Reply #4 on: 30 Apr 2010, 14:33:05 »
Maybe memory points named
- kulomet
or
- machinegun
or
- zasleh