Home   Help Search Login Register  

Author Topic: Retexturing Mh-60 rotors not spinning  (Read 3906 times)

0 Members and 1 Guest are viewing this topic.

Offline upsilon

  • Members
  • *
Retexturing Mh-60 rotors not spinning
« on: 02 May 2011, 21:11:52 »
Code: [Select]
#include "basicDefines.hpp"
#include "CrewAnimations.hpp"
class CfgPatches
{
class CAAir
{
units[] =
{
"ah1w","UH60","UH60MG","ParachuteWest","BISCamel",
"Ka50","Mi17","Mi17_mg","ParachuteEast",
"Parachute","ParachuteG","ParachuteC","BISCamel2"
};
weapons[] = {};
requiredVersion = 0.10;
requiredAddons[] = {"CACharacters","CAWeapons","CA_Anims_Char"};
};
};


class CfgVehicles
{
class AllVehicles;
class Helicopter;

class upsilon_helicopter: Helicopter
{
class NewTurret;
class ViewPilot;
};

class upsilon_helicopter_1: upsilon_helicopter
{
skeletonInherit="UH60Skeleton";
//selectionHRotorStill = "velka vrtule staticka";
//selectionHRotorMove = "velka vrtule blur";
type = 2;//VAir
nameSound = "chopper";
rotorBig = vrtule_velka;
rotorBigBlend = vrtule_velka_bl;
//rotorSmall = vrtule_mala;
//rotorSmallBlend = vrtule_mala_bl;
weapons[]={};
magazines[]={};
crewVulnerable = 1;
getInAction=GetInMedium;
getOutAction = GetOutMedium;
class HitHull {armor=1;material=51;name="NEtrup";visual="trup";passThrough=1;} // disabled points from model
class HitEngine {armor=0.25;material=51;name="motor";visual="motor";passThrough=1;}
class HitAvionics {armor=0.15;material=51;name="elektronika";visual="elektronika";passThrough=0;}
class HitVRotor {armor=0.3;material=51;name="mala vrtule";visual="mala vrtule";passThrough=0;}
class HitHRotor {armor=0.2;material=51;name="velka vrtule";visual="velka vrtule";passThrough=0;}
class HitMissiles {armor=0.1;material=51;name="munice";visual="munice";passThrough=1;}
class HitRGlass {armor=0.1;material=51;name="sklo predni P";visual="sklo predni P";passThrough=0;}
class HitLGlass {armor=0.1;material=51;name="sklo predni L";visual="sklo predni L";passThrough=0;}
class ViewPilot: ViewPilot
{
initFov=0.8; minFov=0.3; maxFov=1.2;
initAngleX=10; minAngleX=-45; maxAngleX=+80;
initAngleY=0; minAngleY=-125; maxAngleY=+125;
};
class Turrets
{
class MainTurret : NewTurret
{
outGunnerMayFire = 1; //Engine assumes helicopter gunner is turned out.
commanding = -1;
memoryPointsGetInGunner= "pos gunner";
memoryPointsGetInGunnerDir= "pos gunner dir";
memoryPointGun = "machinegun";
memoryPointGunnerOptics= "gunnerview";
selectionFireAnim = "zasleh";
castGunnerShadow = 1;
viewGunnerShadow = 1;
gunnerAction = AH1Z_Gunner;
gunnerInAction = AH1Z_Gunner;
gunnerOpticsModel=\ca\air\optika_heli_gunner;
gunnerForceOptics = 0;
class HitTurret {armor=0.2;material=51;name="vez";visual="vez";passThrough=0;};
class HitGun {armor=0.2;material=51;name="zbran";visual="zbran";passThrough=0;};
};
};
class AnimationSources;
dammageHalf[]=
{
\ca\air\data\jeep_kab_sklo1.paa,\ca\air\data\jeep_kab_sklo1B.paa,
\ca\air\data\uh60_kab_sklo2.paa,\ca\air\data\uh60_kab_sklo2B.paa,
\ca\air\data\uh60_gunner_okna.paa,\ca\air\data\uh60_gunner_oknaB.paa,
\ca\air\data\ah-1_kabina_predokno.paa,\ca\air\data\ah-1_kabina_predoknoB.paa,
\ca\air\data\ah-1_kabina_zadokno.paa,\ca\air\data\ah-1_kabina_zadoknoB.paa,
\ca\air\data\ah-1_kabina_topokno.paa,\ca\air\data\ah-1_kabina_topoknoB.paa
};
dammageFull[]=
{
\ca\air\data\jeep_kab_sklo1.paa,\ca\air\data\jeep_kab_sklo1C.paa,
\ca\air\data\uh60_kab_sklo2.paa,\ca\air\data\uh60_kab_sklo2C.paa,
\ca\air\data\uh60_gunner_okna.paa,\ca\air\data\uh60_gunner_oknaC.paa,
\ca\air\data\ah-1_kabina_predokno.paa,\ca\air\data\ah-1_kabina_predoknoC.paa,
\ca\air\data\ah-1_kabina_zadokno.paa,\ca\air\data\ah-1_kabina_zadoknoC.paa,
\ca\air\data\ah-1_kabina_topokno.paa,\ca\air\data\ah-1_kabina_topoknoC.paa
};
soundEngine[] = {"\ca\Air\Data\Sound\helicopter", db30, 1};
soundEnviron[] = {"\ca\Air\Data\Sound\noise", db-30, 1.0};
soundDammage[] = {"\ca\Air\Data\Sound\alarm_loop1", db-40, 1};
class EventHandlers {};
supplyRadius = 1.2;

accuracy=0.02;
camouflage=100;
audible=40;
};


class UH60MG: upsilon_helicopter_1
{
scope = public;
displayName=$STR_DN_UH60_MG;
model="Upsilon_choppers\uh_60mg";
mapSize = 14;
picture = "\ca\air\data\ico\uh_60mg_CA.paa";
Icon="\ca\air\data\map_ico\icomap_uh60mg_CA.paa";
nameSound="blackhawk";
side=TWest;
crew = SoldierWPilot;

maxSpeed = 270;

accuracy=0.30;
armor=40;
damageResistance = 0.00242;
cost=10000000;

mainRotorSpeed = -1;

minMainRotorDive = -7;
maxMainRotorDive = 5;
neutralMainRotorDive = -2;

soundEngine[]={\ca\air\Data\Sound\UH1_engine_v1,db31,1};
soundGetIn[]={\ca\air\Data\Sound\heli_door3,db-20,1};
soundGetOut[]={\ca\air\Data\Sound\heli_door3,db-20,1};

driverInAction = UH60_Pilot;
driverAction = UH60_Pilot;
cargoAction[]={
UH60_Cargo01,UH60_Cargo02
};
transportSoldier = 13;

enableSweep=false;
transportAmmo = 0;
supplyRadius = 2.5;

initCargoAngleY=+10; // cargo viewing limitations
minCargoAngleY=-60;
maxCargoAngleY=+120;

type=2;
//threat[] VSoft, VArmor, VAir
threat[]={0.3, 1, 0.4};

typicalCargo[]={SoldierWPilot,SoldierWPilot, SoldierWAT, SoldierWAT};
// cargoIsCoDriver[] = {false,false,false,false,true}; Enable copilot
weapons[]={};
magazines[]={};
transportMaxMagazines = 150;
transportMaxWeapons = 30;
forceHideDriver = true;
castDriverShadow = true;
    castCargoShadow = true;
//hideProxyInCombat=true;
class Library
{
  libTextDesc = $STR_LIB_UH60;
};
dammageHalf[]=
{
\ca\air\data\UH60_skla_CA.paa,\ca\air\data\UH60_sklabr1_CA.paa,
\ca\air\data\UH60_skla_CA.paa,\ca\air\data\UH60_sklabr1_CA.paa
};
dammageFull[]=
{
\ca\air\data\UH60_skla_CA.paa,\ca\air\data\UH60_sklabr2_CA.paa,
\ca\air\data\UH60_skla_CA.paa,\ca\air\data\UH60_sklabr2_CA.paa
};
class Damage
{
tex[]={};
mat[]={
"ca\air\data\materialy\uh60_01.rvmat",
"ca\air\data\materialy\uh60_01.rvmat",
"ca\air\data\materialy\uh60_01_destruct.rvmat",
"ca\air\data\materialy\uh60_02.rvmat",
"ca\air\data\materialy\uh60_02.rvmat",
"ca\air\data\materialy\uh60_02_destruct.rvmat",
"ca\air\data\materialy\uh60_03.rvmat",
"ca\air\data\materialy\uh60_03.rvmat",
"ca\air\data\materialy\uh60_03_destruct.rvmat",
"ca\air\data\materialy\uh60_04.rvmat",
"ca\air\data\materialy\uh60_04.rvmat",
"ca\air\data\materialy\uh60_04_destruct.rvmat"
};
};
class Turrets : Turrets
{
class MainTurret: MainTurret //Left Doorgun
{
body = "mainTurret";
gun = "mainGun";
minElev=-80; maxElev=+25; initElev=-80;
minTurn=30; maxTurn=150; initTurn=90;
soundServo[]={,db-40,1.0};

gunBeg = "muzzle_1";
gunEnd = "chamber_1";
weapons[]={M134};
magazines[]={2000Rnd_762x51_M134};
gunnerName = $STR_POSITION_CREWCHIEF;
gunnerOpticsModel = "\ca\weapons\optika_empty";
gunnerOutOpticsShowCursor = 1;
gunnerOpticsShowCursor = 1;
gunnerAction = UH60_Gunner;
gunnerInAction = UH60_Gunner;
primaryGunner = 1;
class ViewOptics
{
initAngleX=0; minAngleX=-30; maxAngleX=+30;
initAngleY=0; minAngleY=-100; maxAngleY=+100;
initFov=0.42; minFov=0.22; maxFov=0.64;
};
};
class RightDoorGun: MainTurret
{
body = "Turret_2";
gun = "Gun_2";
animationSourceBody = "Turret_2";
animationSourceGun = "Gun_2";
animationSourceHatch = "";
selectionFireAnim = "zasleh_1";

proxyIndex = 2;
gunnerName = $STR_POSITION_DOORGUNNER;
commanding = -2;

minTurn=-150; maxTurn=-30; initTurn=-90;
weapons[]= {M134_2};

gunBeg = "muzzle_2"; //gunBeg = endpoint of the gun
gunEnd = "chamber_2"; //gunEnd = chamber of the gun

primaryGunner = 0;

memoryPointGun = "machinegun_2";
memoryPointGunnerOptics= "gunnerview_2";
};
};
class AnimationSources: AnimationSources
{
class Gatling_1
{
source = "reload";
weapon = M134;
};
class Gatling_2
{
source = "reload";
weapon = M134_2;
};
};
class Reflectors
{
class Left
{
color[] = {0.8, 0.8, 1.0, 1.0};
ambient[] = {0.07, 0.07, 0.07, 1.0};
position = "L svetlo";
direction = "konec L svetla";
hitpoint = "L svetlo";
selection = "L svetlo";
size = 1;
brightness = 1.0;
};
class Right
{
color[] = {0.8, 0.8, 1.0, 1.0};
ambient[] = {0.07, 0.07, 0.07, 1.0};
position = "P svetlo";
direction = "konec P svetla";
hitpoint = "P svetlo";
selection = "P svetlo";
size = 1;
brightness = 1.0;
};
};
};
class UH60: UH60MG
{
model="Upsilon_choppers\upsilon_chopper";
picture = "Upsilon_choppers\ico\upsilon_chopper_ico.paa";
Icon="Upsilon_choppers\ico\upsilon_chopper_ico.paa";
mapSize = 14;
displayName= "upsilon_airline_ffar";
accuracy = 1000;
showgunneroptics = false;
weapons[]={FFARLauncher};
magazines[]={38Rnd_FFAR};
hasGunner = false;
gunnerUsesPilotView = true;
dammageHalf[]=
{
\ca\air\data\UH60_skla_CA.paa,\ca\air\data\UH60_sklabr1_CA.paa,
\ca\air\data\UH60_skla_CA.paa,\ca\air\data\UH60_sklabr1_CA.paa
};
dammageFull[]=
{
\ca\air\data\UH60_skla_CA.paa,\ca\air\data\UH60_sklabr2_CA.paa,
\ca\air\data\UH60_skla_CA.paa,\ca\air\data\UH60_sklabr2_CA.paa
};
class Damage
{
tex[]={};
mat[]={
"ca\air\data\materialy\uh60_01.rvmat",
"ca\air\data\materialy\uh60_01.rvmat",
"ca\air\data\materialy\uh60_01_destruct.rvmat",
"ca\air\data\materialy\uh60_02.rvmat",
"ca\air\data\materialy\uh60_02.rvmat",
"ca\air\data\materialy\uh60_02_destruct.rvmat",
"ca\air\data\materialy\uh60_03.rvmat",
"ca\air\data\materialy\uh60_03.rvmat",
"ca\air\data\materialy\uh60_03_destruct.rvmat",
"ca\air\data\materialy\uh60_04.rvmat",
"ca\air\data\materialy\uh60_04.rvmat",
"ca\air\data\materialy\uh60_04_destruct.rvmat"
};
};
class Turrets {};
soundGetIn[] = {
"\ca\Sound\Air\Noises\heli_door_01", 0.316228, 1
};
soundGetOut[] = {
"\ca\Sound\Air\Noises\heli_door_01", 0.316228, 1, 30
};
soundEnviron[] = {
"", 0.031623, 1.000000
};
soundDammage[] = {
"\ca\Air\Data\Sound\alarm_loop1", 0.001000, 1
};

class Sounds
{

class Engine
{
frequency = "rotorSpeed";
volume = "camPos*((rotorSpeed-0.72)*4)";
sound[] = {
"upsilon_choppers\sounds\uh60_engine", 2.511890, 1.000000, 900
};
};

class RotorLowOut
{
frequency = "rotorSpeed";
volume = "camPos*(0 max (rotorSpeed-0.1))";
cone[] = {
1.600000, 3.140000, 2.000000, 0.500000
};
sound[] = {
"upsilon_choppers\sounds\uh60_rotor", 2.511890, 1.000000, 1400
};
};

class RotorHighOut
{
frequency = "rotorSpeed";
volume = "camPos*10*(0 max (rotorThrust-0.9))";
cone[] = {
1.600000, 3.140000, 2.000000, 0.500000
};
sound[] = {
"upsilon_choppers\sounds\uh60_rotor", 2.511890, 1.000000, 1600
};
};

class EngineIn
{
frequency = "rotorSpeed";
volume = "(1-camPos)*((rotorSpeed-0.75)*4)";
sound[] = {
"upsilon_choppers\sounds\uh60_internal", 3.162278, 1.000000
};
};

class RotorLowIn
{
frequency = "rotorSpeed";
volume = "2*(1-camPos)*((rotorSpeed factor[0.3, 1.1]) min (rotorSpeed factor[1.1, 0.3]))";
sound[] = {
"upsilon_choppers\sounds\uh60_rotor", 3.162278, 1.000000
};
};

class RotorHighIn
{
frequency = "rotorSpeed";
volume = "(1-camPos)*3*(rotorThrust-0.9)";
sound[] = {
"upsilon_choppers\sounds\uh60_rotor", 3.162278, 1.000000
};
};
};


};
};


 and my models.cfg (if needed).
Code: [Select]
class CfgSkeletons
{
class Default;
class Vehicle;
class Plane: Vehicle
{
skeletonInherit="Vehicle";
skeletonBones[]=
{
"alt",
"",
"alt2",
"",
"mph",
"",
"mph2",
"",
"vert_speed",
"",
"vert_speed2",
"",
"nm_alt",
"",
"hud_alt",
"",
"hud_speed",
"",
"rpm",
"",
"kompas",
"",
"kompas2",
"",
"hodinova",
"",
"hodinova2",
"",
"minutova",
"",
"minutova2",
"",
"horizont_dive",
"",
"horizont",
"horizont_dive",
"horizont_dive2",
"",
"horizont2",
"horizont_dive2",
"lkh klapka",
"",
"pkh klapka",
"",
"lkd klapka",
"",
"pkd klapka",
"",
"leva smerovka",
"",
"leva vejskovka",
"",
"prava smerovka",
"",
"prava vejskovka",
"",
"ls klapka",
"",
"ps klapka",
"",
"predni kolo",
"",
"levy kolo",
"",
"pravy kolo",
"",
"vrtule",
"",
"damageHide",
""
};
};

class Helicopter: Vehicle
{
skeletonInherit="Vehicle";
skeletonBones[]=
{
"velka vrtule",
"",
"mala vrtule",
"",
"otocvez",
"",
"otochlaven",
"otocvez",
"alt",
"",
"alt2",
"",
"nm_alt",
"",
"nm_alt2",
"",
"mph",
"",
"mph2",
"",
"vert_speed",
"",
"vert_speed2",
"",
"rpm",
"",
"rpm2",
"",
"horizont_dive",
"",
"horizont",
"horizont_dive",
"horizont2_dive",
"",
"horizont2",
"horizont2_dive",
"kompas",
"",
"kompas2",
"",
"hodinova",
"",
"hodinova2",
"",
"minutova",
"",
"minutova2",
"",
"damageHide",
"",
"rotorShaft",
""
};
};
class UH60Skeleton: Helicopter
{
skeletonInherit="Helicopter";
skeletonBones[]=
{
"dampers",
"",
"damper_rear",
"",
"elevator",
"",
"horizont_dive",
"",
"horizont_dive2",
""
};
};

class Rotation;
class CfgModels
{
class Default;
class Vehicle;
class Helicopter: Vehicle
{
sectionsInherit="Vehicle";
sections[]=
{
"sklo predni p",
"sklo predni l",
"velka vrtule staticka",
"velka vrtule blur",
"mala vrtule staticka",
"mala vrtule blur",
"trup",
"motor",
"elektronika",
"mala vrtule",
"velka vrtule",
"munice",
"zbran",
"vez",
"clan",
"clan_sign",
"podsvit pristroju"
};
skeletonName="Helicopter";
class Animations
{
class damageHide
{
type="hide";
source="damage";
selection="damageHide";
};
class IndicatorAltRadar: Rotation
{
source="altRadar";
sourceAddress="loop";
selection="alt";
axis="osa_alt";
memory=0;
maxValue=304;
angle1="rad -360";
};
class IndicatorAltRadar2: IndicatorAltRadar
{
selection="alt2";
axis="osa_alt2";
};
class IndicatorAltBaro: Rotation
{
source="altBaro";
selection="nm_alt";
axis="osa_nm_alt";
memory="false";
maxValue=61;
angle1="rad -180";
};
class IndicatorAltBaro2: IndicatorAltBaro
{
selection="nm_alt2";
axis="osa_nm_alt2";
};
class IndicatorSpeed: Rotation
{
source="speed";
selection="mph";
axis="osa_mph";
memory="false";
maxValue=125;
angle1="rad -320";
};
class IndicatorSpeed2: IndicatorSpeed
{
selection="mph2";
axis="osa_mph2";
};
class IndicatorVertSpeed: Rotation
{
source="vertSpeed";
selection="vert_speed";
axis="osa_vert_speed";
memory=0;
minValue=-30.000000;
maxValue=30.000000;
angle1=-5.235988;
};
class IndicatorVertSpeed2: IndicatorVertSpeed
{
selection="vert_speed2";
axis="osa_vert_speed2";
memory=0;
};
class IndicatorRPM: Rotation
{
source="rpm";
selection="rpm";
axis="osa_rpm";
memory="false";
maxValue=12;
angle1="rad -320";
};
class IndicatorRPM2: IndicatorRPM
{
selection="rpm2";
axis="osa_rpm2";
};
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 IndicatorCompass2: IndicatorCompass
{
selection="kompas2";
axis="osa_kompas2";
};
class WatchHour: Rotation
{
source="clockHour";
selection="hodinova";
axis="osa_time";
memory="false";
angle1="rad -360";
};
class WatchHour2: WatchHour
{
selection="hodinova2";
axis="osa_time2";
};
class WatchMinute: Rotation
{
source="clockMinute";
selection="minutova";
axis="osa_time";
memory="false";
angle1="rad -360";
};
class WatchMinute2: WatchMinute
{
selection="minutova2";
axis="osa_time2";
};
class HRotor: Rotation
{
source="rotorH";
selection="velka vrtule";
axis="velka osa";
angle1="2 * 3.1415926536";
};
class RotorShaft: HRotor
{
selection="RotorShaft";
};
class VRotor: Rotation
{
source="rotorV";
selection="mala vrtule";
axis="mala osa";
angle1="2 * 3.1415926536";
};
class HorizonBank
{
type="rotationZ";
source="horizonBank";
selection="horizont";
axis="osa_horizont";
memory="false";
minValue="rad -360";
maxValue="rad +360";
angle0="rad -360";
angle1="rad +360";
};
class HorizonDive
{
type="rotationX";
source="horizonDive";
selection="horizont_dive";
axis="osa_horizont";
memory=0;
minValue="rad -360";
maxValue="rad +360";
angle0="rad -360";
angle1="rad +360";
};
class Horizon2Bank: HorizonBank
{
selection="horizont2";
axis="osa_horizont2";
};
class Horizon2Dive: HorizonDive
{
selection="horizont2_dive";
axis="osa_horizont2";
};
class RotorHDive
{
selection="velka vrtule";
axis="predni osa naklonu";
type="rotationX";
source="rotorHDive";
minValue="rad -90";
maxValue="rad +90";
angle0="rad -90";
angle1="rad +90";
animPeriod=0;
};
class mala_vrtule_damage: damageHide
{
selection="mala vrtule";
};
class velka_vrtule_damage: damageHide
{
selection="velka vrtule";
};
class rotorShaft_damage: damageHide
{
selection="rotorShaft";
};
};
};
class uh_60: Helicopter
{
skeletonName="UH60Skeleton";
sectionsInherit="Helicopter";
sections[]={};
class Animations: Animations
{
class IndicatorSpeed: IndicatorSpeed
{
maxValue=50.000000;
angle0=0.261799;
angle1=5.759586;
};
class IndicatorSpeed2: IndicatorSpeed2
{
maxValue=50.000000;
angle0=0.261799;
angle1=5.759586;
};
class dampers: Rotation
{
source="altRadar";
selection="dampers";
axis="dampers_axis";
maxValue=0.400000;
angle0=-0.087266;
angle1=-0.296706;
};
class dampers_rear: dampers
{
selection="damper_rear";
axis="damper_rear_axis";
angle0=0.000000;
};
class elevator: Rotation
{
source="speed";
selection="elevator";
axis="elevator_axis";
minValue=25.000000;
maxValue=27.799999;
angle0=-0.523599;
angle1=0.000000;
};
class IndicatorVertSpeed2: IndicatorVertSpeed2
{
type="rotation";
source="vertSpeed";
selection="vert_speed2";
axis="osa_vert_speed2";
memory=0;
minValue=-30.000000;
maxValue=30.000000;
angle0=3.141593;
angle1=-3.141593;
};
class IndicatorVertSpeed: IndicatorVertSpeed
{
type="rotation";
source="vertSpeed";
selection="vert_speed";
axis="osa_vert_speed";
memory=0;
minValue=-30.000000;
maxValue=30.000000;
angle0=3.141593;
angle1=-3.141593;
};
class IndicatorAltBaro: IndicatorAltBaro
{
type="rotation";
source="altBaro";
selection="nm_alt";
axis="osa_nm_alt";
memory=0;
minValue=30.000000;
maxValue=61.000000;
angle0=0.000000;
angle1=6.108653;
};
class IndicatorAltBaro2: IndicatorAltBaro2
{
type="rotation";
source="altBaro";
selection="nm_alt2";
axis="osa_nm_alt2";
memory=0;
minValue=30.000000;
maxValue=61.000000;
angle0=0.000000;
angle1=6.108653;
};
class IndicatorAltRadar: IndicatorAltRadar
{
type="rotation";
source="altRadar";
selection="alt";
axis="osa_alt";
memory=0;
minValue=0.000000;
maxValue=304.000000;
angle0=-2.268928;
angle1=4.363323;
};
class IndicatorAltRadar2: IndicatorAltRadar2
{
angle0=-2.268928;
angle1=4.363323;
};
class elevator_damage: damageHide
{
selection="elevator";
};
class HorizonDive: HorizonDive
{
angle0=-6.283185;
angle1=6.283185;
};
};
};
};





Best regards.
 


Offline Gnat

  • Addons Depot
  • Former Staff
  • ****
  • I Bite!
    • Gnats
Re: Retexturing Mh-60 rotors not spinning
« Reply #1 on: 03 May 2011, 14:45:59 »
Hi Upsilon.
You MODEL.CFG is off track, its too layered, too complicated for a start.
Make sure all the definded names in O2 (the p3d file) EXACTLY match the names in model.cfg

Here is an example chopper model.cfg
Quote
class CfgSkeletons
{
   class Ka27Skeleton
   {
      isDiscrete=1;
      skeletonInherit="";
      skeletonBones[]=
      {
         "velka vrtule","",
         "mala vrtule","",
         "rotorShaft","",
         "rotorShaft_rear","",
         "otocvez","",
         "otochlaven","otocvez",
         "alt","",
         "alt2","",
         "nm_alt","",
         "nm_alt2","",
         "mph","",
         "mph2","",
         "vert_speed","",
         "vert_speed2","",
         "rpm","",
         "rpm2","",
         "horizont_dive","",
         "horizont","horizont_dive",
         "horizont2_dive","",
         "horizont2","horizont2_dive",
         "kompas","",
         "kompas2","",
         "hodinova","",
         "hodinova2","",
         "minutova","",
         "minutova2","",
         "damageHide","",
         "dd",""
      };
   };
};
class CfgModels
{
   class Mi_8MT;
   class THE_FILE_NAME_OF_MY_P3D: Mi_8MT
   {
      sectionsInherit="";
      skeletonName="Ka27Skeleton";
      sections[] = {
         "sklo predni p",
         "sklo predni l",
         "velka vrtule staticka",
         "velka vrtule blur",
         "mala vrtule staticka",
         "mala vrtule blur",
         "trup",
         "motor",
         "elektronika",
         "mala vrtule",
         "velka vrtule",
         "munice",
         "zbran",
         "vez",
         "clan",
         "clan_sign",
         "podsvit pristroju",
         "alt",
         "alt2",
         "nm_alt",
         "nm_alt2",
         "mph",
         "mph2",
         "vert_speed",
         "vert_speed2",
         "rpm",
         "rpm2",
         "horizont_dive",
         "horizont",
         "horizont2_dive",
         "horizont2",
         "kompas",
         "kompas2",
         "hodinova",
         "hodinova2",
         "minutova",
         "minutova2",
         "damageHide",
         "rotorShaft",
         "rotorShaft_rear",
         "dd"
      };
      
      class Animations
      {
         class damageHide
         {
            type="hide";
            source="damage";
            selection="damageHide";
         };
         class r1Hide
         {
            type="hide";
            source="damage";
            selection="velka vrtule";
         };
         class r2Hide
         {
            type="hide";
            source="damage";
            selection="mala vrtule";
         };
         class r3Hide
         {
            type="hide";
            source="damage";
            selection="RotorShaft";
         };
         class r4Hide
         {
            type="hide";
            source="damage";
            selection="rotorShaft_rear";
         };
         class HRotor
         {
            type="rotation";
            source="rotorH";
            selection="velka vrtule";
            axis="velka osa";
            angle0=0;
            angle1=6.283185;
         };
         class VRotor
         {
            type="rotation";
            source="rotorV";
            selection="mala vrtule";
            axis="mala osa";
            angle0=0;
            angle1=-6.283185;
         };
         class RotorShaft
         {
            type="rotation";
            selection="RotorShaft";
            source="rotorH";
            axis="velka osa";
            angle0=0;
            angle1=6.283185;
         };
         class rotorShaft_rear
         {
            type="rotation";
            selection="rotorShaft_rear";
            source="rotorV";
            axis="mala osa";
            angle0=0;
            angle1=-6.283185;         
         };         
         class IndicatorSpeed
         {
            type="rotation";
            source="speed";
            selection="mph";
            axis="osa_mph";
            memory="false";
            maxValue=125;         
            angle0=0;
            angle1="rad -350";
         };
         class HorizonDive
         {
            type="rotationX";
            source="horizonDive";
            selection="horizont_dive";
            axis="osa_horizont";
            memory=0;
            minValue="rad -360";
            maxValue="rad +360";         
            angle0=-0.314159;
            angle1=0.314159;
         };
         class IndicatorVertSpeed
         {
            type="rotation";
            source="vertSpeed";
            selection="vert_speed";
            axis="osa_vert_speed";
            memory=0;
            minValue=-30.000000;
            maxValue=30.000000;
            angle0=0;
            angle1=-5.235988;
         };
         class IndicatorVertSpeed2
         {
            type="rotation";
            source="vertSpeed";
            selection="vert_speed2";
            axis="osa_vert_speed2";
            memory=0;
            minValue=-30.000000;
            maxValue=30.000000;
            angle0=0;
            angle1=-5.235988;
         };
         class IndicatorCompass
         {
            type="rotation";
            source="direction";
            selection="kompas";
            axis="osa_kompas";
            memory=0;
            minValue=-3.141590;
            maxValue=3.141590;         
            angle0=0.000000;
            angle1=-6.283185;
         };
         class IndicatorCompass2
         {
            type="rotation";
            source="direction";
            selection="kompas2";
            axis="osa_kompas2";
            memory=0;
            minValue=-3.141590;
            maxValue=3.141590;         
            angle0=0.000000;
            angle1=-6.283185;         
         };
      };
   };
};

Offline i0n0s

  • Former Staff
  • ****
Re: Retexturing Mh-60 rotors not spinning
« Reply #2 on: 03 May 2011, 17:08:43 »
And one thing: If you doesn't change a value, you don't need to redefine it.
This will reduce the size of your config a lot.

Offline upsilon

  • Members
  • *
Re: Retexturing Mh-60 rotors not spinning
« Reply #3 on: 15 May 2011, 18:24:29 »
Hello,

Thanks a lot for you help guys, now it's working fine :)

I have another question.
In fact, two.


I would like to be able to open/close manualy my cargo doors.

If I don't use "source" :
It's working but not, smoothly, when I clic, open it just move the doors from the pointA to the pointB with no "animation".


I tried to use differents sources like "speed", "altradar", but I don"t know why my MinValue and my MaxValue are used instead of my Offset0 and offset1.


More over, I would like to have my dampers moving up and down a little bit when  I am on final to touch the ground (it's an helicopter), and according to my config.cpp and my model.cfg, It would work, but it's not.

Config .cpp


Code: [Select]

class UserActions
{
  class OpenDoor // action to open the door
  {
    displayName="Open Cargo Doors"; // string that's displayed in the action menu
    position="cargo_doors_action"; // name of the 'action point'
    radius=1.5; // how close the player has to be see this action
    condition="this animationPhase ""Move_cargo_doors"" < 0.5"; // check whether the door has moved already
    statement="this animate[""Move_cargo_doors"",1.8]"; // and if not, then start the animation
    onlyforplayer = true; // requirement by ArmA - presumably defines if AI can/cannot open doors etc
  };
  class CloseDoor // action to close the door
  {
    displayName="Close Cargo Doors";
    position="cargo_doors_action";
    radius=1.5;
    condition="this animationPhase ""Move_cargo_doors"" > 0.5";
    statement="this animate[""Move_cargo_doors"",0]";
    onlyforplayer = true;
  };






model.cfg

Code: [Select]

class dampers
{
type="rotation";
source="altRadar";
selection="dampers";
axis="dampers_axis";
maxValue=0.400000;
angle0=-0.087266;
angle1=-0.296706;
};
class dampers_rear: dampers
{
selection="damper_rear";
axis="damper_rear_axis";
angle0=0.000000;
};

class Move_cargo_doors
{
type="translationZ";
axis="";
source="speed";
animPeriod=10;
selection="cargo_doors";
minValue = 0;
maxValue = 1.80;
offset0=50;
offset1=56;
};





 

Best regard


Offline Gnat

  • Addons Depot
  • Former Staff
  • ****
  • I Bite!
    • Gnats
Re: Retexturing Mh-60 rotors not spinning
« Reply #4 on: 17 May 2011, 11:26:21 »
You've mixed to different problems/solutions here.
Do you want either;
- User Action only, opening and closing doors
- Height or Speed automaticily closing or opening doors

You may be able to combine both, but due to complexity you need to select 1 or the other.
Please advise.

Offline upsilon

  • Members
  • *
Re: Retexturing Mh-60 rotors not spinning
« Reply #5 on: 17 May 2011, 22:47:00 »
Hello Gnat,

Here I posted examples of my files.
What I really want is "User action".
But i don't want to clic on "close cago doors" and this imediatly close them by a super-natural power and no one is able to see the animation.
I want Somthing like when you are outside off the merlin, and the door is sliding when to open and close position.

But in my chopper, I want my pilot (me) whenever I want, to be able to close and open cargo doors.

I not able to have it working good :s

Best regards

Offline Gnat

  • Addons Depot
  • Former Staff
  • ****
  • I Bite!
    • Gnats
Re: Retexturing Mh-60 rotors not spinning
« Reply #6 on: 18 May 2011, 13:03:28 »
OK
In CONFIG.CPP under CfgVehicles, for your vehicle you need something like;
Code: [Select]
class AnimationSources
{
class  userdoors
{
source = "user";
animPeriod = 4;  //seconds
initPhase=0;
};
};

In same file you need something like;
Code: [Select]
class UserActions
{
class chopperdoor1
{
priority = 0;
displayName = "Doors Open";
position = "pilotactionpoint";
onlyforplayer = 0;
radius = 8;
condition = "(player in this)and(this animationphase ""leftdoor"" ==0)";
statement = "this animate [""leftdoor"",1];this animate [""rightdoor"",1];";
};
class chopperdoor2
{
priority = 0;
displayName = "Doors Close";
position = "pilotactionpoint";
onlyforplayer = 0;
radius = 8;
condition = "(player in this)and(this animationphase ""leftdoor"" ==1)";
statement = "this animate [""leftdoor"",0];this animate [""rightdoor"",0];";
};
};

In you p3d model, in the MEMORY LOD;
 - near the pilots location you need a point called something like; "pilotactionpoint"
     (The pilot (or crew) see the menu when they are near this point)

 - near where the door starts to move, define a point "tStart"
 - near where the same part of the door finishes its move, define a point "tEnd"
     (The doors move directly in line between those 2 points. the points dont actually have to be at the doors, the 2 points simply define DIRECTION and DISTANCE for the translation animation)


Now in MODEL.CFG you need to define you door animations.
Do all you normal Skeleton bits under CfgSkeletons, then under CfgModels do below also.
Recommend you use TRANSLATION not rotation for doors.
Code: [Select]

class leftdoor
{
type = "translation";
source = "userdoors";
selection = "mylefthanddoor";
animPeriod = 4;
begin = "tStart";
end = "tEnd";
sourceAddress = "clamp";
memory = 1;
minValue = 0.0;
maxValue = 1.0;
offset0 = 0.0;
offset1 = 1.0;
};
class rightdoor
{
type = "translation";
source = "userdoors";
selection = "myrighthanddoor";
animPeriod = 4;
begin = "tStart";
end = "tEnd";
sourceAddress = "clamp";
memory = 1;
minValue = 0.0;
maxValue = 1.0;
offset0 = 0.0;
offset1 = 1.0;
};

Obviously many of the names between the model and the 2 files need to match to allow them all to link correctly.
Make sure you check those names, including exact spelling.
Theres 2 different locations for "animPeriod=", but cant remember which one actually determines the door open-close time.
If you get a "AnimationSources" error, chances are you need to define you CfgVehicle inheritance correctly.

Should work ..........

Offline upsilon

  • Members
  • *
Re: Retexturing Mh-60 rotors not spinning
« Reply #7 on: 20 May 2011, 22:43:39 »
I love you Gnat, every think is working fine :)

Another question about flares.
I do have my flares point in my memory LOD but it' not working like the MH-60 in the game.

What i mean is that it drops flares but like a big flares (both are nearby).

I think i should have to add a memory point like Konec_somthink, just like guns and lights are working.
Do you know the name of that memory point ?


Best regards
« Last Edit: 21 May 2011, 00:24:22 by upsilon »

Offline Gnat

  • Addons Depot
  • Former Staff
  • ****
  • I Bite!
    • Gnats
Re: Retexturing Mh-60 rotors not spinning
« Reply #8 on: 21 May 2011, 13:10:29 »
Good to hear.

For flares, if you are inheriting the BIS standard MH60 config, you probably only need 4 points in the MEMORY LOD.

"Inner" or launch point on one side, called "flare_launcher1"
"Outer" or direction point on the same side (small distance away, about maybe 0.3m), called "flare_launcher1_dir"

Same again on the other side of the chopper, just swap "1" for "2"

Offline upsilon

  • Members
  • *
Re: Retexturing Mh-60 rotors not spinning
« Reply #9 on: 21 May 2011, 19:57:58 »
Thanks again

i missed those points : flare_launcher1_dir, flare_launcher2_dir

You are the best