Jump to content

Recommended Posts

  • ED Team
Posted (edited)

By some requests internal logic of SFM planes control surfaces was switched off when custom cockpit present . instead of that you now have ability to set control surfaces position directly

by using

local value =  get_aircraft_draw_argument_value(arg_number)
set_aircraft_draw_argument_value(arg_number,value)

Edited by Alex O'kean
sigpic2354_5.gif
Posted

is this the same for landing Gear and Speedbrakes?

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Posted

It's very nice to get off work and see this thread. Thank you very much, Alex. I know I (and others) made a lot of noise about this one, so I do appreciate you coming through for us.

Posted

Interesting, I wonder has anyone managed to use this code successfully to get a working gear up down command? It seems to me based on that code that we can set a particular argument value directly, but if I set arg 430 to 1, will the system detect that arg 430 is gear and adjust the drag parameters accordingly? I guess what I am asking is, are the gear and flap still tied to the sfm, or do we now have to code more than a command to get the gear or flaps to act appropriately?

[sIGPIC][/sIGPIC]

Find us at http://virtual-roulettes.forumotion.com/

Posted

I was able to do it via arguments 0, 3, and 5, but only for single player. It appears other aircraft across multiplayer are not picking that up, which is a problem. I'll try using AFM arg numbers and see what happens.

Posted

Smiley, try the following. I don't know how you defined your landing_gear_system, but this sample works fine. I trigger the action with a button in the internal cockpit. this is from my electric_system.lua initialisation file.

As it is, it's gear down or gear up, no animation. I guess you'll have to code the animation too.

 

local update_time_step = 0.1

 

make_default_activity(update_time_step)

 

local GEAR_STATE = 0

 

function SetCommand(command,value)

if command == 3001 then

GEAR_STATE = value

end

end

 

function update()

set_aircraft_draw_argument_value(0,GEAR_STATE)

end

 

EDIT : How do you make your text appear in a code window in th thread ?

Posted

There is another small issue here. When you go from value 0 to 1 it doesn't animate the process of going from 0 1. So it either shows gears up or gears down. I'm working to see if I can code a delay for it to make it look animated..but no luck yet.

 

Also trying to figure out how to get the keyboard keys to works again. I've tried adjusting the input file to use the command number for the function (like gear) but no avail at this point.

Coder - Oculus Rift Guy - Court Jester

Posted

Dimebag - it appears you must use traditional SFM arguments, 0-114. Flight control positions transmit over multiplayer for me, but gear position does not.

 

Alex, or anyone qualified, can you shed some light on why gear position may not be shared across multiplayer instances?

Posted

Here we go, triple-post! Seems it is possible to animate the gear across multiplayer. It may be an issue with my initialized state. If I can narrow it down to a succinct algorithmic problem, I'll post to make sure no one else runs into the same issue.

Posted

Aaron,

 

Will find you sometime on Skype. But the keyboard inputs are not top priority right now. Got so much other stuff to deal with. Hopefully your project is going well.

 

Roiegat, if you can catch me on Skype, I'll explain the keyboard bit.

Coder - Oculus Rift Guy - Court Jester

Posted

Pat - if I find time to write it up this week, yes!

 

Aaron,

 

Will find you sometime on Skype. But the keyboard inputs are not top priority right now. Got so much other stuff to deal with. Hopefully your project is going well.

 

No worries. Going well, just digging out of the hole and back up to usable status.:D

Posted (edited)

Aaron, no need, I got it.

 

To All,

The "set_aircraft_draw_argument_value" and "get_aircraft_draw_argument_value" functions are only for external model args.

Are there some similar functions for internal cockpit model ?

 

Smiley, Could you tell me two little words about animating ?

Edited by Pat01
Posted

No, no... cockpit animations are very different. Take a look in mainpanel_init.lua for cockpit animations. Clickable objects, however, have their animation done differently, via clickabledata.lua.

Posted

Aaron, Thanks for pointing me in the right direction.

I didn't see a thing that was just in front of my eyes.

I'm having a look at it.

Posted

Ok, I got my cockpit door working with a shortkey, external and cockpit models.

Now I'm looking for playing a sound.

Posted

CptSmiley,

 

I got my cockpit door (external and cockpit models) animated and working with a keyboard shortkey.

I'm looking for playing a sound that suit the opening/closing door with no luck at this time.

I looked in the fm template as you told me, but I didn't notice nothing concerning any sound.

 

Now, I'm dealing with the external nav lights that don't work as planned.

 

Thanks.

Posted

Pat, check this one

 

\DCS World\DCS World\Mods\aircrafts\Wunderluft\Cockpit\mainpanel_init.lua

 

in the end you can find list for animation what you need

--base_gauge_StickRollPosition
--base_gauge_StickPitchPosition
--base_gauge_RudderPosition
--base_gauge_ThrottleLeftPosition
--base_gauge_ThrottleRightPosition
--base_gauge_HelicopterCollective

Posted

I already created a gauge


StickPitch = CreateGauge()
StickPitch.arg_number = 74
StickPitch.input = {-1, 1}
StickPitch.output = {-1, 1}
StickPitch.controller = controllers.base_gauge_StickPitchPosition
[/Code]

But nothing happened, something's missing...

The arg #74 has been rechecked in the model.

I noticed the Joystick isn't dealed the same way the keyboard is.

I tried to read some message from the stick with no success.

I have no more idea at the moment.

  • Recently Browsing   0 members

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