1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.35 Bug Reporting thread
    Solutions and more information may already be available.

Joystick throttle axis (Accel/Brake same axis)

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by 2point8jeep, Apr 12, 2014.

  1. 2point8jeep

    2point8jeep
    Expand Collapse

    Joined:
    Apr 6, 2014
    Messages:
    2
    Hello, I am having trouble getting the joystick throttle axis to control both the throttle and brake. Prior to the last update, I had it working using a code i found using the search but it seems they've changed how the scripting works in some way that I cannot understand. Any code ive been able to find either gives me reverse only, or just nothing happens at all. Anyone have this issue since the last update? Here's what i've got at the moment:

    Using this, i have reverse only, and in the wrong direction (throttle forward= more reverse. Throttle back=nothing happens).

    I apologize for the noob question, but most of the above script might as well be a foreign language to me, LOL.

    Any help appreciated
     
  2. 2point8jeep

    2point8jeep
    Expand Collapse

    Joined:
    Apr 6, 2014
    Messages:
    2
    Nevermind, got it figured out. Apparently when you use the "update now" it resets the game files to unmodified ones. I was finally able to find the post i originally used to get it working. For those having the same problem:

    http://www.beamng.com/archive/index.php/t-5306.html

    Basically, add this to beamng.cs:


    and this to the controller's input map:

     
  3. HagDerVriese

    HagDerVriese
    Expand Collapse

    Joined:
    Apr 17, 2013
    Messages:
    18
    i got a different solution:

    i added following to beamNG.cs:

    function accelBrake( %val ) {
    if(%val < 0) {
    vlua("input.axisY=" @ %val*-1);
    vlua("input.axisY2=" @ 0);
    }
    else {
    vlua("input.axisY=" @ 0);
    vlua("input.axisY2=" @ %val);
    }
    }

    The function decides whether i am braking or accelerating and sends the value to the right input axis

    in my inputmap i added:

    moveMap.bind(%device, yaxis,"D", $gp_deadzone , accelBrake);

    It works for me and the techdemo i installed.

    grets
    HAG
     
  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