1. Stuck, Having problems with creating your mod? Let us help you: Mod Support

Combination button/axis inputs in inputmaps?

Discussion in 'Programming' started by Tango91, Sep 19, 2017.

  1. Tango91

    Tango91
    Expand Collapse

    Joined:
    Aug 3, 2013
    Messages:
    59
    Howdy. I'm playing about with some custom inputmaps and lua for a forklift truck, with great success, but I'd like to know if it's possible to use combinations of buttons/axis as inputs.

    For instance, At the moment i have the main fork/mast lif hydros on the forklift mapped to "thumbry" (right thumbstick Y-axis on my xbox controller).

    This overrides the camera controls you'd typically have assigned to that stick, which is a bit annoying.

    Is it possible to have the input only trigger when the clutch button (Left bumper) is held?

    The current binding in xidevice.json:

    {
    "control" : "thumbry" ,
    "action" : "lift" ,
    "deadzone": {
    "begin": -0.25,
    "end": 0.25
    },
    },

    presumably this would include the addtion of "btn_lb" somewhere inline with "thumbry" but i'll be damned if i can get it to work.

    Anyone happen to know the right way?

    Thanks :)

    Cheeky snap:
     
  2. Neo

    Neo
    Expand Collapse

    Joined:
    Oct 31, 2015
    Messages:
    209
    With json is that not possible, but you could use lua to load the input mapping files (only a guess) or use lua to handle the whole inputs. You may also able to check in you vehicle lua if a particular button is pressed and then you could do magic stuff ;)
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice