Jump to content

Complex Key Binding


DDSSTT

Recommended Posts

I've asked this question in a few different locations including discord, but never get any response.

 

How do I create a multi-function keybinding when using a single Off-On Toggle Switch, that in the game has a switch cover on it?

 

For example, the F-18 has a spin recovery on the right side that is a guarded toggle switch. When I switch the toggle switch ON, I would like to raise the cover and toggle the switch, and then when I toggle the switch to OFF, it toggles the switch down and closes the cover.

 

I was able to get the key bindings to work with an (On)-Off-(On) switch, as seen in the below lua code, but I have been unable to figure out the script for a single on off switch.

 

{ down = ctrl_commands.SpinRecCover, up = ctrl_commands.SpinRec, cockpit_device_id = devices.CONTROL_INTERFACE, value_down = 1.0, value_up = 1.0, name = _('ALT Spin Recovery Switch Cover - OPEN'), category = {_('Instrument Panel')}},

 

{ down = ctrl_commands.SpinRec, up = ctrl_commands.SpinRecCover, cockpit_device_id = devices.CONTROL_INTERFACE, value_down = 0.0, value_up = 0.0, name = _('ALT Spin Recovery Switch - NORM'), category = {_('Instrument Panel')}},

[sIGPIC][/sIGPIC]

 

http://www.csg-2.net/

Link to comment
Share on other sites

  • Recently Browsing   0 members

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