Jump to content

Recommended Posts

Posted

I've read the various topics on doing custom keyboard and joystick commands, with special attention to making Warthog 3 positions switches. I'm happy to say that I've got that under control, and have been editing my default.lua file accordingly. The Warthog throttle only has so many 3 position switches...

 

However, I have a number of Saitek throttles with up/down rocker switches that I really would like to make work with some of the 3 position switches of the Mig, such as the Low Altitude Filter, or the Radar (off/standby/On). All I would like to do is have the switch go up when I push my rocker up, and for the switch to go down when I push the rocker down, to cycle through the switch positions (like they can be made to do in the Huey).

 

Can someone give me an example of how to create these commands and get it to work this way?

Posted

Examples I use:

 

--************** Custom ***********************************************************************

--Alternate Gears

{down=device_commands.GearHandleFixator,up=device_commands.GearHandleFixator,cockpit_device_id=devices.GEARS,value_down=1.0,value_up=0.0,name='Alternate Gears Handle Lock released',category='Gears, brakes and chute'},

--Alternate Afterburner

{down=device_commands.Chr,up=device_commands.Chr,cockpit_device_id=devices.ENGINE,value_down=1.0,value_up=0.0,name='Alternate Emergency Afterburner On',category='Engine'},

--Alternate Air Start

{down=device_commands.AirStart,up=device_commands.AirStart,cockpit_device_id=devices.ENGINE_START_DEVICE,value_down=1.0,value_up=0.0,name='Alternate Engine Emergency Air Start On',category='Engine'},

--SAU

{down=device_commands.SAUlowAltOn,up=device_commands.SAUlowAltOn,cockpit_device_id=devices.SAU,value_down=1.0,value_up=0.0,name='Alternate SAU - Low Altitude Recovery On',category='SAU'},

 

Theres a thread with good explanation somewhere here...sry I did not find it with quick search (must go to work now^^)

Posted (edited)

Thanks for the suggestion to use SC mapper, Platypus. I've done so much scripting already with the lua files, that I think for the time being, I'm going to defer on using that tool, and if possible stick with the LUA. @ Zabuza, those examples you gave are specifically for Warthog-like 2 position switches that stay up, or stay down. I've already got those scripted, thanks to the stickied post at the top of this forum. What I'm talking about is being able to cycle up or down through a 3 position Mig switch with a 2 position rocker switch on a Saitek throttle quadrant (which for all practical purposes is the same as 2 buttons). For example, the Mig Radar has an 'Off', a 'Standby', and an 'On' position. If the switch is 'Off', then I want to be able to push my rocker up (button 1) once and have the Mig radar move to the 'Standby' position. If I push my rocker up again, the Mig radar switch will move to the 'On' position. Then, if I push my rocker down (button 2), then the Mig radar switch will move back down to 'Standby'. And if I push rocker down again, the Radar switch will move back to 'Off'. So, again, I'm looking just for a simple Inc/Dec functionality. Most other DCS craft, such as the Huey, allow inc/dec commands natively, but not the Mig. I've spent a large amount of time reading all of the forum threads I could find on the subject of control mapping, and have still come up empty handed. Surely there must be a way to do this with the LUA scripts?

Edited by Nutrition
Posted
Thanks for the suggestion to use SC mapper, Platypus. I've done so much scripting already with the lua files, that I think for the time being, I'm going to defer on using that tool, and if possible stick with the LUA. @ Zabuza, those examples you gave are specifically for Warthog-like 2 position switches that stay up, or stay down. I've already got those scripted, thanks to the stickied post at the top of this forum. What I'm talking about is being able to cycle up or down through a 3 position Mig switch with a 2 position rocker switch on a Saitek throttle quadrant (which for all practical purposes is the same as 2 buttons). For example, the Mig Radar has an 'Off', a 'Standby', and an 'On' position. If the switch is 'Off', then I want to be able to push my rocker up (button 1) once and have the Mig radar move to the 'Standby' position. If I push my rocker up again, the Mig radar switch will move to the 'On' position. Then, if I push my rocker down (button 2), then the Mig radar switch will move back down to 'Standby'. And if I push rocker down again, the Radar switch will move back to 'Off'. So, again, I'm looking just for a simple Inc/Dec functionality. Most other DCS craft, such as the Huey, allow inc/dec commands natively, but not the Mig. I've spent a large amount of time reading all of the forum threads I could find on the subject of control mapping, and have still come up empty handed. Surely there must be a way to do this with the LUA scripts?

 

There is a thread where they ask for that feature, e.g. for the weapon selector. It seems there is no easy solution for that, they all programmed something with external tools.

Thread:

http://forums.eagle.ru/showthread.php?t=132364

  • Recently Browsing   0 members

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