Jump to content

Advanced Flight Model Set Gear State??


CptSmiley

Recommended Posts

The problem is that neither P-51 or A10C or any other ED product is using wHumanCustomPhysicsAPI.h interface (they have their own base EagleFM API). This is a new thing they rolled for third-parties and it is far from being complete (I imagine we will get expanded API in later DCS World updates).

 

That is, so far, the plan.

i7 7700K | 32GB RAM | GTX 1080Ti | Rift CV1 | TM Warthog | Win 10

 

"There will always be people with a false sense of entitlement.

You can want it, you can ask for it, but you don't automatically deserve it. "

Link to comment
Share on other sites

Yep, for now I'll concentrate on the flight model and hope they add the ability to alter such things as the gear state from the AFM or else nobody can really utilize the AFM

"Witness mere F-14s taking off from adjacent flight decks, gracefully canting left and right, afterburners flaming, and there’s something that sweeps you away—or at least it does me. And no amount of knowledge of the potential abuses of carrier task forces can affect the depth of that feeling. It simply speaks to another part of me. It doesn’t want recriminations or politics. It just wants to fly.”

― Carl Sagan

Link to comment
Share on other sites

  • 2 weeks later...

Hey all I know I'm being a pain but here goes...

 

I've both found out how to "draw" the gear but not actually change the gear state...I've been able to set the draw args both through C++ via the external flight model, I've also been able to manipulate the gear position via LUA through a cockpit system...

 

I've also found this function in Export.lua:

 

LoGetMechInfo() -- mechanization info
result_is =
{
gear          = {status,value,main = {left = {rod},right = {rod},nose =  {rod}}}
flaps		  = {status,value}  
speedbrakes   = {status,value}
refuelingboom = {status,value}
airintake     = {status,value}
noseflap      = {status,value}
parachute     = {status,value}
wheelbrakes   = {status,value}
hook          = {status,value}
wing          = {status,value}
canopy        = {status,value}
controlsurfaces = {elevator = {left,right},eleron = {left,right},rudder = {left,right}} -- relative vlues (-1,1) (min /max) (sorry:(
} 

 

Is there a way in the LUA code as a cockpit system I can manipulate the gear state like the function above, except I'm wanting something like "LoSetMechInfo" not "Get".

 

To be clear I am looking for how to set the gear STATE not just draw the gear being extended through the 3D model, here is a video example of drawing the gear out but the sim still thinks it is in a "gear up" STATE...I'm super desperate for any help it is just bugging me to no end.

 

To also prevent people thinking I'm being dumb, when I start off a mission on the runway, my aircraft is correctly at the right heigh according to the gear locations set in the aircraft config LUA but it drops a meter or so on its belly...so it isn't that my gear positions in the LUA are incorrect.

 

I really hope someone can help me....thanks again Tango for the help you've provided so far.

 

"Witness mere F-14s taking off from adjacent flight decks, gracefully canting left and right, afterburners flaming, and there’s something that sweeps you away—or at least it does me. And no amount of knowledge of the potential abuses of carrier task forces can affect the depth of that feeling. It simply speaks to another part of me. It doesn’t want recriminations or politics. It just wants to fly.”

― Carl Sagan

Link to comment
Share on other sites

LoGetMechInfo is deprecated. You now have get_base_data() to fulfill that purpose in lua, which can do many of those things. (example, getRightMainLandingGearDown. See the bottom of the test aircraft's mainpanel_init.lua.)

 

I have not delved into EFMs yet, but I'm pretty sure the game changes when you move away from SFMs. (And even this method does not work in SFM, as of 1.2.2.) However, presently I set gear position up or down using the many arguments as seen at the bottom of Export.lua, combined with dispatch_action(). (Example: dispatch_action(nil,147))

 

Again, this won't solve your problem. Something is different in 1.2.2, and I'm hoping it's the result of a solution not yet revealed! :)

Link to comment
Share on other sites

Hey aaron, well I know for certain I can run aircraft systems and call lua functions within those aircraft systems even with an EFM running...so could I call a dispatch_action within there to get my gear state change accomplished? Thanks for your help and insight...I'm willing to give anything a shot that I've found and your suggestion is one I haven't yet heard

 

I just tried it really quick with no success :( did a dispatch_action 431 (gear down) in my aircraft system in the same place I was drawing the gear down and still no go...


Edited by CptSmiley

"Witness mere F-14s taking off from adjacent flight decks, gracefully canting left and right, afterburners flaming, and there’s something that sweeps you away—or at least it does me. And no amount of knowledge of the potential abuses of carrier task forces can affect the depth of that feeling. It simply speaks to another part of me. It doesn’t want recriminations or politics. It just wants to fly.”

― Carl Sagan

Link to comment
Share on other sites

Found out what the problem is!!!

 

Thanks to Skatezilla...it is due to how connectors or something are defined in the 3D Model (I don't do 3D stuff so not sure if I'm speaking correctly)

 

In any case, if I use the A-10 or the P-51 as a base model (not the F-16) the gear works great!

 

So my problem now is I need a F-16 3D model with the correctly defined 3D stuff (connectors?) to make it happen!

"Witness mere F-14s taking off from adjacent flight decks, gracefully canting left and right, afterburners flaming, and there’s something that sweeps you away—or at least it does me. And no amount of knowledge of the potential abuses of carrier task forces can affect the depth of that feeling. It simply speaks to another part of me. It doesn’t want recriminations or politics. It just wants to fly.”

― Carl Sagan

Link to comment
Share on other sites

  • 5 years later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...