npmproductions13 14 Posted November 25, 2016 First off my issue is iv'e tried adding a ramp to one of my new upcoming VTOL aircraft. My problem is i cant seem to get a prompt in game to raise / lower the ramp. I have configured my models "Memory" Lod to have an axis and also have a selection of the door linked to the axis and have made adjustments to the model.cfg and config.cpp It compiles fine but again no prompt in game. Another thing i want to know is would my issue stem from not having a area for the player to interact like how you define the driver seat ?? Model.cfg class CfgSkeletons { class Default { isDiscrete = 1; skeletonInherit = ""; skeletonBones[] = {}; }; class Vehicle : Default {}; class Plane: Vehicle {}; class SkyrangerSkeleton: Plane { skeletonInherit = "Plane"; skeletonBones[] = { "vejskovka","", "smerovka","", "left_engine","", "right_engine","", "door1","", "wheel_1","", "wheel_2","", "wheel_3","", "stick_pilot","", "pedal","" }; }; class CfgModels { class Default { sectionsInherit=""; sections[] = {}; skeletonName = ""; }; class Vehicle: Default {}; class Plane : Vehicle {}; class Skyranger: Plane { skeletonName="SkyrangerSkeleton"; sections[]= { "clan", // for the clan squad xml pic add a selection to the model and name it clan "clan_sign", // same here, add a plane to the model called clan_sign "vrtule staticka", "vrtule blur", "camo1", "camo2" }; class Animations { class Elevator { type="rotation"; source="elevator"; selection="vejskovka"; axis="osa vejskovky"; minValue=-1; maxValue=1; angle0="rad 30"; angle1="rad -30"; }; class Rudder { type="rotation"; source="rudder"; selection="smerovka"; axis="osa smerovky"; minValue=-1; maxValue=1; angle0="rad 35"; angle1="rad -35"; }; class left_engine { type="rotation"; source="elevator"; selection="left_engine"; axis="left_engine"; minValue=-1; maxValue=1; angle0="rad -35"; angle1="rad 35"; }; class right_engine { type="rotation"; source="elevator"; selection="right_engine"; axis="right_engine"; minValue=-1; maxValue=1; angle0="rad -35"; angle1="rad 35"; }; class wheel_1 { type="rotation"; source="wheel"; selection="wheel_1"; axis="wheel_axis"; memory=1; sourceAddress = "loop"; minValue = 0.0; maxValue = 1.0; angle0=rad 0; angle1=rad -360; }; class wheel_2: wheel_1 { selection="wheel_2"; axis="wheel_axis"; }; class wheel_3: wheel_1 { selection="wheel_3"; axis="wheel_axis_3"; }; class Stick_Pilot_Bank { type="rotation"; axis="stick_pilot_ail_axis"; source="aileron"; selection="stick_pilot"; minValue=-1; maxValue=1; angle0="rad -10"; angle1="rad 10"; }; class Stick_Pilot_Dive { type="rotation"; axis="stick_pilot_ele_axis"; source="elevator"; selection="stick_pilot"; minValue=-1; maxValue=1; angle0="rad -10"; angle1="rad 10"; }; class door1 { type="translation"; axis="doorX_axis"; animPeriod=1; source="Doors"; selection="door1"; offset0=0; offset1=1.00; minValue=0; maxValue=0.05; }; class rotor { type="rotation"; source="rotor"; selection="vrtule"; axis="osa vrtule"; sourceAddress="loop"; minValue = 0.0; maxValue = 0.2; angle0=rad 0; angle1=rad 360; }; }; }; }; }; Config.cpp #include "basicdefines_A3.hpp" class CfgPatches { class NPMP_Skyranger { author = "Irish Ace"; authorUrl = ""; version = 0.11; units[] = {"NPMP_Skyranger"}; // Add the names here for visibility in ZEUS! requiredAddons[] = {}; // add required addons here }; }; class CfgVehicles { class Air; class Plane: Air { class Sounds; class AnimationSources; }; class NPMP_Skyranger_BASE : Plane { displayName = "NPMP_Skyranger"; model = "NPMP_Skyranger\Skyranger.p3d"; // path to p3d of the model vtol = 3; icon = "NPMP_Skyranger\data\icomap_ultralight_ca.paa"; // map icon picture = "NPMP_Skyranger\data\icomap_ultralight_ca.paa"; // icon of you sitting inside, or someone else mapSize = 10; // size of icon on map simulation = "airplanex"; // airplane or airplaneX (physX) - airplaneX won't be able to land on carriers or use seaplane scripts crew = "C_man_shorts_2_F"; cabinOpening = false; gearRetracting = true; flaps = false; // pilot *************************** driverCompartments = "Compartment1"; driverAction = "Plane_Fighter_03_Pilot"; driverInAction = pilot_Heli_Light_02; /// what is the standard pose for the pilot, defined as animation state precisegetinout = 1; /// describes what style of get in is used (0 - non-precise; 1 - precise on proxy; 2 - precise on model center) GetInAction = pilot_Heli_Light_02_Enter; /// what action uses the pilot to get in the heli, it uses "switchAction" script command on the proxy GetOutAction = pilot_Heli_Light_02_Exit; /// what action uses the pilot to get out of heli cargoGetInAction[] = {"GetInHelicopterCargo"}; /// actions for the cargo, the last one in array is used for the rest cargoGetOutAction[] = {"GetOutHelicopterCargo"};/// that means every cargo position could use different action to get in transportSoldier = 8; /// how many cargo positions are available cargoAction[] = { /// the same array as getIn/getOut actions for actions to switch to for cargo while inside the heli passenger_apc_narrow_generic03, passenger_apc_generic02, passenger_apc_narrow_generic01, passenger_apc_generic04, passenger_apc_narrow_generic02, passenger_generic01_leanright, passenger_generic01_leanleft, passenger_generic01_foldhands }; driverIsCommander = true; ejectDeadDriver = true; hideWeaponsDriver = true; hideWeaponsCargo = true; memoryPointsGetInDriver = "pos driver"; memoryPointsGetInDriverDir = "pos driver dir"; driverLeftHandAnimName = ""; driverRightHandAnimName = "stick_pilot"; driverLeftLegAnimName = ""; driverRightLegAnimName = ""; // Armor, Weapons, Vulnerability, etc *************************** radarType = 0; enableManualFire = false; fuelCapacity = 500; fov = 0.7; maxFordingDepth = 0.3; passThrough = 0.7; crewVulnerable = "true"; accuracy = 0.2; cost = 2000; laserScanner = 0; gunAimDown = 0.029000; minFireTime = 30; threat[]={0.1, 1, 0.7}; type=VAir; ejectSpeed[] = {0, 0, 0}; armor = 10; damageResistance = 0.00278; destrType = DestructWreck; irScanRangeMin = 50; irScanRangeMax = 5000; irScanToEyeFactor = 2; damageEffect = "DamageSmokePlane"; weapons[] = {}; magazines[] = {}; // textures, camera *************************** hiddenSelections[] = {"camo1"}; extCameraPosition[] = {0,0.5,-15}; // flight, swim and drive Model *************************** #include "SkyrangerFlightmodel.hpp" // sounds *************************** insideSoundCoef = 0.8; nameSound = "plane"; soundGetIn[]={"\NPMP_Skyranger\data\sounds\close",db--15, 1.0}; soundGetOut[]={"\NPMP_Skyranger\data\sounds\open",db--15, 1.0}; soundDammage[]={"\NPMP_Skyranger\data\sounds\alarm_loop1", db-5, 1}; attenuationEffectType = "OpenHeliAttenuation"; soundEngineOnInt[] = {"A3\Sounds_F\air\Plane_Fighter_03\Plane_Fighter_03-start_int", db-0, 1.0}; soundEngineOnExt[] = {"A3\Sounds_F\air\Plane_Fighter_03\Plane_Fighter_03-start_ext", db5, 1.0, 500}; soundEngineOffInt[] = {"A3\Sounds_F\air\Plane_Fighter_03\Plane_Fighter_03-stop_int", db-0, 1.0}; soundEngineOffExt[] = {"A3\Sounds_F\air\Plane_Fighter_03\Plane_Fighter_03-stop_ext", db5, 1.0, 500}; class Sounds { class EngineLowOut { sound[] = {"A3\Sounds_F\air\Plane_Fighter_03\Plane_Fighter_03_low_ext", db8, 1.0, 1200}; frequency = "1.0 min (rpm + 0.5)"; volume = "camPos*(rpm factor[0.95, 0])*(rpm factor[0, 0.95])"; }; class EngineHighOut { sound[] = {"A3\Sounds_F\air\Plane_Fighter_03\Plane_Fighter_03_engi_ext", db8, 1.2, 1400}; frequency = "1"; volume = "camPos*(rpm factor[0.5, 1.1])*(rpm factor[1.1, 0.5])"; }; class ForsageOut { sound[] = {"A3\Sounds_F\air\Plane_Fighter_03\Plane_Fighter_03-fors_ext", db5, 0.99, 1700}; frequency = "1"; volume = "engineOn*camPos*(thrust factor[0.6, 1.0])"; cone[] = {3.14, 3.92, 2.0, 0.5}; }; class WindNoiseOut { sound[] = {"A3\Sounds_F\air\Plane_Fighter_03\noise", db-5, 1.0, 150}; frequency = "(0.1+(1.2*(speed factor[1, 150])))"; volume = "camPos*(speed factor[1, 150])"; }; class EngineLowIn { sound[] = {"A3\Sounds_F\air\Plane_Fighter_03\Plane_Fighter_03_low_int", db0, 1.0}; frequency = "1.0 min (rpm + 0.5)"; volume = "(1-camPos)*((rpm factor[0.7, 0.1])*(rpm factor[0.1, 0.7]))"; }; class EngineHighIn { sound[] = {"A3\Sounds_F\air\Plane_Fighter_03\Plane_Fighter_03_engi_int", db0, 1.2}; frequency = "1"; volume = "(1-camPos)*(rpm factor[0.85, 1.0])"; }; class ForsageIn { sound[] = {"A3\Sounds_F\air\Plane_Fighter_03\Plane_Fighter_03-fors_int", db0, 1.0}; frequency = "1"; volume = "engineOn*(1-camPos)*(thrust factor[0.6, 1.0])"; }; class WindNoiseIn { sound[] = {"A3\Sounds_F\air\Plane_Fighter_03\noise", db-6, 1.0}; frequency = "(0.1+(1.2*(speed factor[1, 150])))"; volume = "(1-camPos)*(speed factor[1, 150])"; }; }; class Exhausts { class Exhaust1 { position = "exhaust"; direction = "exhaust_dir"; effect = "ExhaustsEffect"; }; }; class AnimationSources { class Doors /// the class name is later used in model.cfg { source = door1; /// door source means it is used by animateDoor script command animPeriod = 1; /// how long does it take to change value from 0 to 1 (or vice versa) initPhase = 0; /// what value does it have while creating the vehicle }; }; class UserActions /// actions available for player to interact with vehicle via action menu running scripts { class Door_Open { userActionID = 60; /// ID for some scripts displayName = "Open door"; /// what is displayed in action menu displayNameDefault = "<img image='\A3\Ui_f\data\IGUI\Cfg\Actions\open_door_ca.paa' size='2.5' />"; /// what is displayed under the cursor (icon in this case) position = ""; /// start of radius where action is available condition = "this doorPhase ""Doors"" < 0.5 AND Alive(this) AND (player in crew this)"; /// only openable from inside and when closed statement = "this animateDoor ['Doors', 1]"; /// sets animation source Doors to 1 via interpolation priority = 1.5; /// higher priority means higher in the Action menu radius = 1.5; /// how far from position is the action available showWindow = 0; /// 0 means that it is not a default action when entering the vehicle onlyForPlayer = 1; /// AI doesn't use this one shortcut = ""; /// there's no shortcut for this action }; class Door_Close: Door_Open { userActionID = 61; displayName = "Close door"; textToolTip = "Close door"; condition = "this doorPhase ""Doors"" > 0.5 AND Alive(this) AND (player in crew this)"; statement = "this animateDoor ['Doors', 0]"; }; }; class Damage { tex[]={}; mat[]={}; }; class Reflectors { class Main { color[] = {1900, 1800, 1700}; /// approximate colour of standard lights ambient[] = {5, 5, 5}; /// nearly a white one position = "L svetlo"; direction = "L svetlo dir"; hitpoint = "L svetlo"; selection = "L svetlo"; size = 1; /// size of the light point seen from distance innerAngle = 100; /// angle of full light outerAngle = 179; /// angle of some light coneFadeCoef = 10; /// attenuation of light between the above angles intensity = 1; /// strength of the light useFlare = true; /// does the light use flare? dayLight = false; /// switching light off during day saves CPU a lot flareSize = 1.0; /// how big is the flare class Attenuation { start = 1.0; constant = 0; linear = 0; quadratic = 0.25; hardLimitStart = 30; /// it is good to have some limit otherwise the light would shine to infinite distance hardLimitEnd = 60; /// this allows adding more lights into scene }; }; }; class MarkerLights { class NPMP_RedStill { name = "PositionLight_red"; color[] = {1.0, 0.1, 0.1, 1}; ambient[] = {0.1, 0.01, 0.01, 1}; brightness = 0.05; blinking = false; }; class NPMP_GreenStill { name = "PositionLight_green"; color[] = {0.1, 1.0, 0.1, 1}; ambient[] = {0.01, 0.1, 0.01, 1}; brightness = 0.05; blinking = false; }; class NPMP_WhiteCollision { name = "CollisionLight"; color[] = {1.0, 1.0, 1.0, 1}; ambient[] = {0.1, 0.1, 0.1, 1}; brightness = 0.03; blinking = true; }; }; class TransportMagazines { }; class TransportItems { class _xx_FirstAidKit { name = "FirstAidKit"; count = 1; }; }; class TransportBackpacks { }; class TransportWeapons { }; class Library { libTextDesc = "Skyranger MK2"; }; }; class NPMP_Skyranger: NPMP_Skyranger_BASE { author = "Irish Ace"; scope = public; displayName = "Skyranger MK2"; side = 3; faction = CIV_F; vehicleClass = "air"; hiddenSelectionsTextures[] = {"NPMP_Skyranger\data\texture.paa"}; crew = "C_man_shorts_2_F"; weapons[] = {}; magazines[] = {}; }; }; Any help i get, i am thankful for and i will add extracts from any configs that might be needed-Irish Share this post Link to post Share on other sites
npmproductions13 14 Posted November 25, 2016 Ok i have gotten the "Open Door" option on the in game action menu but when i activate it the door advisably doesn't open. Share this post Link to post Share on other sites
scars09 9 Posted November 25, 2016 class Doors /// the class name is later used in model.cfg { source = door1; /// door source means it is used by animateDoor script command animPeriod = 1; /// how long does it take to change value from 0 to 1 (or vice versa) initPhase = 0; /// what value does it have while creating the vehicle }; source=user; i guess 1 Share this post Link to post Share on other sites
npmproductions13 14 Posted November 25, 2016 Yea that didn't work but makes sence now that you recommend it. I have the option in the action menu now since i poseted this but when i press open door nothing happens. Any ideas ? Share this post Link to post Share on other sites
npmproductions13 14 Posted November 26, 2016 Ok i still need help making a door for my heli. I think my issue lies within the following section of code. Can someone explain what each of the following lines of code do as i used a bohemia template and am finding it hard to understand what everything is/does. For example what does this following line of code mean ? >>>> this animationPhase ""Rear_Door"" <<<< and what does it do and what is Rear_Door in reference to i assumed it was the the above class name in AnimationSources but clearly i am wrong. I understand i might be over complicating this and making it hard to understand but its the only way i can explain it. Config.cpp class AnimationSources: AnimationSources{ class Rear_Door /// the class name is later used in model.cfg { source = "user"; /// door source means it is used by animateDoor script command animPeriod = 1; /// how long does it take to change value from 0 to 1 (or vice versa) initPhase = 0; /// what value does it have while creating the vehicle }; }; class UserActions { class Rear_Door_Open { userActionID = 60; /// ID for some scripts displayName = "Open door"; /// what is displayed in action menu position = "actions"; /// start of radius where action is available condition = "this animationPhase ""Rear_Door"" < 0.5 AND Alive(this) AND (player in crew this)"; /// only openable from inside and when closed statement = "this animateDoor ['Rear_Door', 0]"; /// sets animation source Doors to 1 via interpolation priority = 1.5; /// higher priority means higher in the Action menu radius = 1.5; /// how far from position is the action available showWindow = 0; /// 0 means that it is not a default action when entering the vehicle onlyForPlayer = 1; /// AI doesn't use this one shortcut = ""; /// there's no shortcut for this action }; class Rear_Door_Close { userActionID = 61; /// ID for some scripts displayName = "Close door"; /// what is displayed in action menu position = "actions"; /// start of radius where action is available condition = "this animationPhase ""Rear_Door"" > 0.5 AND Alive(this) AND (player in crew this)"; /// only openable from inside and when closed statement = "this animateDoor ['Rear_Door', 1]"; /// sets animation source Doors to 1 via interpolation priority = 1.5; /// higher priority means higher in the Action menu radius = 1.5; /// how far from position is the action available showWindow = 0; /// 0 means that it is not a default action when entering the vehicle onlyForPlayer = 1; /// AI doesn't use this one shortcut = ""; /// there's no shortcut for this action }; }; This is the following link between the door from the model.cfg to the config.cpp Model.cfg class Animations { class Rear_Door // ORI door1 { type="translation"; axis="doorX_axis"; animPeriod=1; source="user"; selection="door1"; offset0=0; offset1=1.00; minValue=0; maxValue=0.05; }; Share this post Link to post Share on other sites
scars09 9 Posted November 27, 2016 door1 is as far i can tell the named selection in the model of your ramp. so we go with door1 in model.cfg door1 needs to be in the skeleton as bone of the mainmodel, and door1 needs to be in sections. //model.cfg class Animations { class door1 // ORI door1 { type="translation"; // are u sure? ramp somehow sounds like rotation, but it really depends on your model axis="door1_axis"; //rename, just for consistency animPeriod=1; source="door1"; //here needs to be the animationsource defined in cfgVehicles, how we call it? door1 selection="door1"; offset0=0; //movement along axis, look at model, try to estimate how much it would move in real live, use that as offset 1. offset1=1.00; minValue=0; // usually min and maxvalue are 0 and 1, thats the spectrum, ´0=no animation, 1= completly animated maxValue=1; }; class AnimationSources: AnimationSources { class door1 /// this is in model.cfg source=door1; { source = "user"; /// user as source in here, but in model.cfg source = door1 (what we define just now) animPeriod = 1; /// how long does it take to change value from 0 to 1 (or vice versa) initPhase = 0; /// what value does it have while creating the vehicle }; }; class UserActions { class door1_open { userActionID = 60; /// ID for some scripts displayName = "Open door"; /// what is displayed in action menu position = "actions"; /// is there a memory point or selection in model with that name? there should be :) condition = "this animationPhase ""door1"" < 0.5 AND Alive(this) AND (player in crew this)"; /// statement = "this animate ['door1', 1]"; /// the 1 here = maxvalue in model.cfg, = fully animated (door open) // please also note that i switched from animatedoor to just animate, think thats enough priority = 1.5; /// higher priority means higher in the Action menu radius = 1.5; /// how far from position is the action available showWindow = 0; /// 0 means that it is not a default action when entering the vehicle onlyForPlayer = 1; /// AI doesn't use this one shortcut = ""; /// there's no shortcut for this action }; class door1_close { userActionID = 61; /// ID for some scripts displayName = "Close door"; /// what is displayed in action menu position = "actions"; /// start of radius where action is available condition = "this animationPhase ""door1"" > 0.5 AND Alive(this) AND (player in crew this)"; /// only openable from inside and when closed statement = "this animate ['door1', 0]"; /// sets animation source Doors to 1 via interpolation priority = 1.5; /// higher priority means higher in the Action menu radius = 1.5; /// how far from position is the action available showWindow = 0; /// 0 means that it is not a default action when entering the vehicle onlyForPlayer = 1; /// AI doesn't use this one shortcut = ""; /// there's no shortcut for this action }; }; try this, no guarantees 1 Share this post Link to post Share on other sites
npmproductions13 14 Posted November 27, 2016 I fixed it very late last night and it works fine now after 2 days tinkering. I really appreciate the time to respond to me Scars thanks for your help. :D Share this post Link to post Share on other sites
npmproductions13 14 Posted November 27, 2016 Scars one more thing thats a tiny bit off topic and a different issue. But do you know how to "Attach" parts to animate together as im working on a multiple part landing gear. Share this post Link to post Share on other sites
scars09 9 Posted November 27, 2016 https://community.bistudio.com/wiki/Model_Config parts are called bones, defined in cfgskeletons, please check the link. but thats the spirit, we got one thing animated, lets split it up and see if we can animate it then :) 1 Share this post Link to post Share on other sites
npmproductions13 14 Posted November 28, 2016 Right that's the landing gear sorted :D Now another thing im having a problem with is the cargo proxies when im in the pilot seat and go into third person i cant see the guys in chairs, same when i get out of the aircraft and look in the door/hatch i cant see them. But when i get in as a passenger (in the back of the aircraft) i can see them all sitting there which clearly tells me its related to a proxy issue what do you think ? I must be missing something simple. --=EDIT=-- I fixed it never mind. It was blender exporting the proxies incorrectly. Share this post Link to post Share on other sites