Jump to content

LUA code for trigger guard


Recommended Posts

In the virpil software (the one that you use to update firmware) take the physical button mapping for the flip trigger, create a new logical mapping, but have it be an INVERTED button. That way, when you pull it, it will cause one logical button press, and when you don't have it activated, it results in a different logical button press. Then you can map both states separately in DCS.

  • Thanks 1
Link to comment
Share on other sites

9 minutes ago, Zyll said:

In the virpil software (the one that you use to update firmware) take the physical button mapping for the flip trigger, create a new logical mapping, but have it be an INVERTED button. That way, when you pull it, it will cause one logical button press, and when you don't have it activated, it results in a different logical button press. Then you can map both states separately in DCS.

Does that work even if I don’t have a Virpil base? 
I have my Virpil grip on a Brunner FFB base….

Link to comment
Share on other sites

Hmmm, I'm going to guess it won't work unfortunately, as the programming would be to the base not the grip. That's just a best guess though. If it doesn't work, a third party software like Joystick Gremlin might accomplish what you are looking for, I don't use it though.

Link to comment
Share on other sites

I can help you edit the LUA files in order to make it into a toggle switch.  May have to fiddle with the order for the code to get what you want to open/close at the correct operations

 

These files will be located in your game install drive  (DCS World open beta/mods/aircraft/ah-64d/input/AH-64D_PLT or CPT/joystick. )

 

Add his command line in between line 70 and 71,    If the commands are backards from what you want.   All you should need to do is swap the UP and Down values  Just copy and past as it is written down.   This will add a new controller bind in the game nammed "open close toggle"

 

{    down = hotas_commands.CYCLIC_TRIGGER_GUARD,    up = hotas_commands.CYCLIC_TRIGGER_GUARD,                                                                                cockpit_device_id = devices.HOTAS_INPUT,    value_down =  0.0,    value_up 1.0,                name = _('Weapons Trigger Guard - OPEN/CLOSE Toggle'),                    category = {_('Cyclic Stick'), _('HOCAS')}},

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

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