PDA

View Full Version : Questions about wheeled apc...



Jabo
Dec 8 2007, 15:28
Hi friends, i recently have finished the modelling of an Spanish armoured recon wheeled vehicle, like this:

http://amadeo.blog.com/repository/697809/1535065.jpg

i´ve just made it´s config, but i´ve encountered some problems that want to ask you if anyone can help me:

- How can I do a commander position in a wheeled vehicle? (i only want it to have a fixed angle optics, not a commander turret), the proxys are fitted in the p3d, i don´t want to made this vehicle as a classTank.

- How can I turn the third pair of wheels in the opposite way to the first pair,like in the real vehicle ( i´ve tried inverting the steering axis but no results...)

- How can i represent the main gun recoil?, if you see below in the config,i´ve created a new animation,i want to animate the barrel to make it have recoil with each shot and that it returns back to it's original possition when it reloads.


here is the config, i have highlighted in black the most relevant sections for my questions:




Quote[/b] ]#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 FFAA_ET_Vehiculos
 {
     units[] =
     {
      "FFAA_ET_VEC"      
     };
     weapons[] = {FFAA_Armas_M242};
     requiredVersion = 1.08;
     requiredAddons[] = {"CAData","CAWheeled","CASounds","CAWeapons"};
 };
};

class CfgVehicleClasses
{
class FFAA_ET_Vehiculos
{
displayName = "FFAA - ET - Vehiculos"
};
};

class CfgSkeletons
{
class Default {};
class Car : Default {};
class Tank ;
class FFAA_ET_VEC_Esqueleto
{
isDiscrete=1;
skeletonInherit="";
skeletonBones[]=
{
"DriveWheel",
"",
"wheel_1_1_damper",
"",
"wheel_1_2_damper",
"",
"wheel_2_1_damper",
"",
"wheel_2_2_damper",
"",
"wheel_3_1_damper",
"",
"wheel_3_2_damper",
"",
"wheel_1_1_steering",
"wheel_1_1_damper",
"wheel_1_2_steering",
"wheel_1_2_damper",
"wheel_1_1",
"wheel_1_1_steering",
"wheel_1_2",
"wheel_1_2_steering",
"wheel_2_1",
"wheel_2_1_damper",
"wheel_2_2",
"wheel_2_2_damper",
"wheel_3_1",
"wheel_3_1_steering",
"wheel_3_2",
"wheel_3_2_steering",
"turret",
"",
"gun",
"turret",
"m242",
"gun",
"hatch_driver",
"",
"hatch_Gunner",
"turret",
"hatch_commander",
"turret",
"damageHide",
""
};
};
};
class CfgModels
{
class Default
{
sections[] = {""};
sectionsInherit="";
};
class Car : Default {};
class Tank ;
class StrykerBase ;
class FFAA_ET_VEC : StrykerBase
{
skeletonName="FFAA_ET_VEC_Esqueleto";
sectionsInherit="Car";
sections[]=
{
"Light_1_1",
"Light_1_2",
"Light_brake",
"Light_back",
"clan",
"clan_sign",
"zasleh",
"karoserie",
"vez",
"motor",
"palivo",
"zbran"
};
class Animations
{
class Steering_1_1
{
type="rotationY";
source="drivingWheel";
selection="wheel_1_1_steering";
axis="wheel_1_1_steering_axis";
memory=1;
minValue="rad -90";
maxValue="rad +90";
angle0=0.900000;
angle1=-0.900000;
};
class Steering_1_2: Steering_1_1
{
selection="wheel_1_2_steering";
axis="wheel_1_2_steering_axis";
};
class Steering_3_1: Steering_1_1
{
selection="wheel_3_1_steering";
axis="wheel_3_1_steering_axis";
memory=1;
minValue="rad -90";
maxValue="rad +90";
angle0=0;
angle1=-0.900000;
};
class Steering_3_2: Steering_1_1
{
selection="wheel_3_2_steering";
axis="wheel_3_2_steering_axis";
memory=1;
minValue="rad -90";
maxValue="rad +90";
angle0=0;
angle1=-0.900000;
};
class Wheel_1_1
{
type="rotationX";
source="wheel";
selection="wheel_1_1";
axis="";
memory=1;
sourceAddress="loop";
minValue=0;
maxValue=1;
angle0=0;
angle1="rad -360";
};
class Wheel_1_2: Wheel_1_1
{
selection="wheel_1_2";
};
class Wheel_2_1: Wheel_1_1
{
selection="wheel_2_1";
};
class Wheel_2_2: Wheel_1_1
{
selection="wheel_2_2";
};
class Wheel_3_1: Wheel_1_1
{
selection="wheel_3_1";
};
class Wheel_3_2: Wheel_1_1
{
selection="wheel_3_2";
};
class Wheel_1_1_Damper
{
type="translationY";
source="damper";
selection="wheel_1_1_damper";
axis="";
minValue=-1;
maxValue=1;
memory=1;
};
class Wheel_1_2_Damper: Wheel_1_1_Damper
{
selection="wheel_1_2_damper";
};
class Wheel_2_1_Damper: Wheel_1_1_Damper
{
selection="wheel_2_1_damper";
};
class Wheel_2_2_Damper: Wheel_1_1_Damper
{
selection="wheel_2_2_damper";
};
class Wheel_3_1_Damper: Wheel_1_1_Damper
{
selection="wheel_3_1_damper";
};
class Wheel_3_2_Damper: Wheel_1_1_Damper
{
selection="wheel_3_2_damper";
};
class MainTurret
{
type="rotationY";
source="mainTurret";
selection="turret";
axis="turret_axis";
animPeriod=0;
minValue="rad -360";
maxValue="rad +360";
angle0="rad -360";
angle1="rad +360";
};
class MainGun
{
type="rotationX";
source="mainGun";
selection="gun";
axis="gun_axis";
animPeriod=0;
minValue="rad -360";
maxValue="rad +360";
angle0="rad -360";
angle1="rad +360";
};
class Retroceso
{
type="translation";
source="reload";  
selection="m242";
axis="M242_recoil";                  
begin="m242_start";
end="m242_end";
minValue=0;
maxValue="1";
offset0="0";
offset1="1";
};
class HatchDriver
{
type = "rotationY";
source="hatchDriver";
selection="hatch_driver";
axis="hatch_driver_axis";
memory="false";
minValue = 0;
maxValue = 1;
angle0 = 0;
angle1="rad -90";
};
class HatchGunner
{
type = "rotationX";
source="hatchGunner";
selection="hatch_gunner";
axis="hatch_gunner_axis";
memory="false";
minValue = 0;
maxValue = 1;
angle0 = 0;
angle1="rad +90";
};
class HatchCommander
{
type = "rotationX";
source="hatchCommander";
selection="hatch_Commander";
axis="hatch_Commander_axis";
memory="false";
minValue = 0;
maxValue = 1;
angle0 = 0;
angle1="rad +90";
};
};
};
};

class CfgAmmo
{
class Default; // External class reference
class TimeBombCore; // External class reference
class MineCore; // External class reference
class BulletCore; // External class reference
class MissileCore; // External class reference
class BulletBase : BulletCore { };
class FlareCore; // External class reference

class FlareBase : FlareCore {};

class ShellCore; // External class reference

class ShellBase : ShellCore {};

class ffaa_Smokeammo : BulletBase
{
hit = 0;
indirectHit = 0;
indirectHitRange = 0;
visibleFire = 18;
audibleFire = 18;
visibleFireTime = 3;
cost = 1;
tracerColor[] = {0, 0, 0, 0};
tracerColorR[] = {0, 0, 0, 0};
};

class FFAA_25mm_HE: BulletBase {
hit = 15;
indirectHit = 5;
indirectHitRange = 0.500000;
visibleFire = 25;
audibleFire = 25;
visibleFireTime = 3;
explosive = 1;
cost = 20;
airLock = 1;
CraterEffects = "ExploAmmoCrater";
explosionEffects = "ExploAmmoExplosion";
tracerColor[] = {0.800000, 0.100000, 0.100000, 0.040000};
tracerColorR[] = {0.800000, 0.100000, 0.100000, 0.040000};
};

class FFAA_25mm_AP : BulletBase
{
hit = 22;
indirectHit = 0;
indirectHitRange = 0;
typicalspeed = 1500;
visibleFire = 25;
audibleFire = 25;
visibleFireTime = 3;
cost = 20;
tracerColor[] = {0.800000, 0.100000, 0.100000, 0.040000};
tracerColorR[] = {0.800000, 0.100000, 0.100000, 0.040000};

};

};

class CfgMagazines
{
class Default; // External class reference

class CA_Magazine : Default {};

class VehicleMagazine : CA_Magazine {};
class ffaa_SmokeLauncherMag : VehicleMagazine {
scope = 2;
displayName = "Smoke launchers";
ammo = "ffaa_Smokeammo";
count = 1;
initSpeed = 2;
};
class ffaa_SmokeLauncherDummy : VehicleMagazine
{
scope = 2;
ammo="";
count = 0;
initSpeed = 1;
};

class FFAA_25HE_100rnd : VehicleMagazine {
scope = public;
displayName = "M242 25mm HEI";
ammo = "FFAA_25mm_HE";
count = 100;
initSpeed = 1350;

};

class FFAA_25AP_70rnd : VehicleMagazine {
scope = public;
displayName = "M242 25mm APDS";
ammo = "FFAA_25mm_AP";
count = 70;
initSpeed = 1500;

};
};

class Mode_SemiAuto;

class Mode_Burst;

class Mode_FullAuto;

class cfgWeapons {
class Default; // External class reference
class PistolCore; // External class reference
class RifleCore; // External class reference
class MGunCore; // External class reference
class LauncherCore; // External class reference
class GrenadeCore; // External class reference
class GrenadeLauncher; // External class reference
class CannonCore; // External class reference
class Launcher; // External class reference
class MGun : MGunCore { };
class Rifle : Riflecore {};
class ffaa_SmokeLauncher : MGun
{
scope = 1;
displayName = "Smoke Launcher";
autoFire = 0;
magazines[] = {"ffaa_SmokeLauncherMag"};
sound[] = {"\ca\Weapons\Data\Sound\Grenade_launch1_A", db-20, 1};
soundServo[] = {"", 0.0001, 1.0};
reloadTime = 0.01;
magazineReloadTime = 0.01;
showempty=false;
maxLeadSpeed = 600;
canLock = 0;
};
class FFAA_Armas_M242: CannonCore {
scope = 1;
displayName = "Cañon automatico 25mm";
//burst = 5;
reloadTime = 0.20000;
autoFire = 1;
magazines[] = {"FFAA_25HE_100rnd", "FFAA_25AP_70rnd"};
modes[]= {"Single","LowROF", "HighROF"};
shotFromTurret = 1;
canLock = 0;

class Single: Mode_SemiAuto {
displayName = "Cadencia tiro simple";
reloadTime = 0.30000;
sound[] = {"\ca\Weapons\Data\Sound\2A42_single2", 17.782795, 1};
soundContinuous = 0;
flash = "gunfire";
flashSize = 0.100000;
recoil = "M240Recoil";
maxLeadSpeed = 600;
aiDispersionCoefX = 2;
ffMagnitude = 0.500000;
ffFrequency = 11;
ffCount = 6;
dispersion = 0.001000;
minRange = 1;
minRangeProbab = 0.100000;
midRange = 1000;
midRangeProbab = 0.580000;
maxRange = 1400;
maxRangeProbab = 0.040000;
};
class LowROF: Mode_Burst {
burst = 3;
multiplier = 1;
displayName = "Cadencia 85dpm";
reloadTime = 0.16000;
sound[] = {"\ca\Weapons\Data\Sound\2A42_single2", 17.782795, 3};
soundContinuous = 1;
recoil = "M240Recoil";
};
class HighROF: Mode_Burst {
burst = 8;
multiplier = 1;
displayName = "Cadencia 200dpm";
reloadTime = 0.019000;
sound[] = {"\ca\Weapons\Data\Sound\2A42_loop1", 17.782795, 1};
soundContinuous = 0;
recoil = "M240Recoil";
};
maxLeadSpeed = 300;
};
};



class CfgVehicles
{
class All{};
class AllVehicles: All{};
class Ship: AllVehicles{};
class Land: AllVehicles{};
class LandVehicle: Land
{
class NewTurret;
class ViewOptics;
/*extern*/ class ViewPilot;
};
class Car: LandVehicle
{
class Turrets;
class MainTurret;
class ViewGunner;
};
class StrykerBase: Car
{
};

class FFAA_ET_VEC: StrykerBase {

side=TGuerrila;
scope = 2;
model = "\FFAA_VEC\FFAA_ET_VEC";
displayName = "VEC-25 M1";
vehicleClass="FFAA_ET_Vehiculos";
crew = "SoldierGB";
hasCommander = 1;
commanderCanSee = 31;
selectionFireAnim = "zasleh";
transportSoldier = 2;
gunneriscommander = 0;
class AnimationSources {

class Retroceso {
source = "reload";
weapon = "FFAA_Armas_M242";
};
};
class Library
{
 libTextDesc="El VEC-25 (Vehiculo de Exploracion de Caballeria) es una modificacion basada en el chasis del blindado de transporte sobre ruedas BMR-600, su principal caracteristica es la adopcion de la torreta TC-25 equipada con el cañon automatico Bushmaster de 25mm, el mismo de los VCI Bradley americanos, asi como con visores para el artillero y jefe de vehiculo. La version mejorada VEC-25M1 cuenta aparte de proteccion adicional en toda la carroceria, equipos mas avanzados de punteria y vision nocturna, que  permiten a este vehiculo conservar un importante papel en misiones de reconocimiento y escolta hasta que se vea sustituido completamente por el nuevo Centauro B1."
};
class Turrets: Turrets {

class MainTurret: MainTurret {

body = "mainTurret";
gun = "mainGun";
gunnerAction = "Stryker_GunnerOut";
gunnerInAction = "Stryker_Gunner";
gunBeg = "gun_muzzle";
gunEnd = "gun_chamber";
memoryPointsGetInGunner = "pos_gunner";
memoryPointsGetInGunnerDir = "pos_gunner_dir";
memoryPointGun = "machinegun";
selectionFireAnim = "zasleh";
gunnerForceOptics = 0;
outGunnerMayFire = 1;
memoryPointGunnerOptics = "gunnerview";
gunnerOpticsModel = "\FFAA_VEC\FFAA_visor_VEC";
memoryPointGunnerOutOptics = "";
gunnerOutOpticsModel = "";
hasGunner = 1;
castGunnerShadow = 1;
minElev = -10;
maxElev = 60;
minTurn = -360;
maxTurn = 360;
gunnerFireAlsoInInternalCamera = 0;
weapons[] = {"FFAA_Armas_M242","PKT","FFAA_SmokeLauncher"};
magazines[] = {"FFAA_25HE_100rnd", "FFAA_25AP_70rnd", "1500Rnd_762x54_PKT", "FFAA_25AP_70rnd","FFAA_25HE_100rnd","FFAA_25HE_100rnd"};

class ViewGunner: ViewGunner {
minAngleY = -100;
maxAngleY = 100;
initFov = 0.420000;
minFov = 0.220000;
maxFov = 0.640000;
};

class ViewOptics: ViewOptics {
initFov = 0.420000;
minFov = 0.220000;
maxFov = 0.640000;
};
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.003162, 1.000000};
gunBeg = "";
gunEnd = "";
minElev = -4;
maxElev = +4;
initElev = 0;
minTurn = -30;
maxTurn = 30;
initTurn = 0;
commanding = 2;
outGunnerMayFire = 1;
inGunnerMayFire = 1;
viewGunnerInExternal = 0;
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";
gunnerAction = "Stryker_GunnerOut";
gunnerInAction = "Stryker_Gunner";

};

};

};
class Exhausts {

class Exhaust1 {
position = "vyfuk start";
direction = "vyfuk konec";
effect = "ExhaustsEffect";
};
};

class EventHandlers
{
fired ="_this exec ""\ffaa_vec\script\fired.sqs""";

};
class UserActions
{
class LaunchSmoke
{
showWindow = 1;
displayName="Lanzar botes de humo";
position="osa_dvere1";
radius=3.500000;
onlyForPlayer= false;
condition="(PLAYER == driver this) OR (PLAYER == gunner this)";
statement="this exec ""\ffaa_vec\script\smoke.sqs""";
};
};
};
}

excuse me about my poor writen english, and thank you for the helpin!

RN Malboeuf
Dec 10 2007, 01:19
I guess it's max render with normal map apllied on the shot ? looks good looking forward for diffuse texture http://forums.bistudio.com/oldsmileys/smile_o.gif


Quote[/b] ]- How can I do a commander position in a wheeled vehicle? (i only want it to have a fixed angle optics, not a commander turret), the proxys are fitted in the p3d, i don´t want to made this vehicle as a classTank.
I guess your problem is that driver commands the vehicle ? set  Gunnersiscommander=1.


Quote[/b] ]- How can I turn the third pair of wheels in the opposite way to the first pair,like in the real vehicle ( i´ve tried inverting the steering axis but no results...)
invert angles (angle0, angle1) of animation http://forums.bistudio.com/oldsmileys/wink_o.gif
And don't mess values and angles http://forums.bistudio.com/oldsmileys/wink_o.gif
example
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class FrontWheelRTurn
{
    type = &#34;rotationY&#34;;
    source = &#34;drivingWheel&#34;;
selection = &#34;pravy predni&#34;;
axis = &#34;&#34;;
memory = true;
sourceAddress = &#34;clamp&#34;;
minValue = -1;
    maxValue = 1;
    angle0 = &#34;rad 25&#34;;
    angle1 = &#34;rad -25&#34;;
  };[/QUOTE]
compare it to your mess http://forums.bistudio.com/oldsmileys/wink_o.gif

Quote[/b] ]- How can i represent the main gun recoil?,
you can search the forums - reload for vehicle it&#39;s reload of the whole magazine. So if you want recoil you either setup your magazine with one shell or make recoil scripted via user anim with fired EH.