[SOLVED] Gamepad trigger support

  • #1, by sebastianFriday, 13. January 2017, 14:48 8 years ago
    Hello there,

    im trying to get my gamepad to run properly with lua script. Everything works fine unless i can't configure the shoulder trigger "buttons" of my gamepad. No event type is recognized by visionaire itself when i trigger the left or right trigger. It seems that the trigger buttons dont go under the "eEvtControllerKeyUp/Down" Events so maybe there is  another eventtype which is called and i dont know?

    Or are these triggers not implemented yet? When i go under the key actions of the game i also can't find them there... 


    Hopefully there is a solution to this

    Sebastian

    Thread Captain

    2346 Posts


  • #2, by SimonSFriday, 13. January 2017, 14:52 8 years ago
    Hello Sebastian,

    the triggers are normally axes. So look there.

    Thread Captain

    1582 Posts

  • #3, by sebastianFriday, 13. January 2017, 15:05 8 years ago
    Ah, yes. Thanks =)
    Are there any Events which go with these so I can test if the trigger axis was pressed or released?

    Or am I right that this Axis (as well as the normal thumbsticks) produce also a keycode? Like when fully triggered = 100 and not triggered = 0 or something?

    EDIT:

     Works smile

    ...
    if string.match(character, 'TRIGGERLEFT') then
       if keycode > 1 then print("linker trigger gedrückt") else print("linker trigger losgelassen") end
      elseif string.match(character, 'TRIGGERRIGHT') then
       if keycode > 1 then print("rechter trigger gedrückt") else print("rechter trigger losgelassen") end
      end
    ...

    Thread Captain

    2346 Posts