1. Trouble with the game?
    Try the troubleshooter!

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

    Dismiss Notice

gas and brake same axis

Discussion in 'General Discussion' started by skyliner_369, Nov 30, 2013.

  1. skyliner_369

    skyliner_369
    Expand Collapse

    Joined:
    Nov 4, 2013
    Messages:
    40
    I got the NASCAR charger by ThrustMaster, and the gas and brake use the same axis. How do I make the controls work properly?

    Here is my map so far, and for the most part, it works.

    Code:
    // product name: Thrustmaster NASCAR charger
    // GUID: {010E045E-0000-0000-0000-504944564944}
    // axes 3^Y^X^RZ
    
    
    $gp_deadzone = "-0.15 0.15";
    moveMap.bind(%device, xaxis, steer_direct);
    moveMap.bind(%device, yaxis, "D", $gp_deadzone, brake);
    moveMap.bind(%device, yaxis, "DI", $gp_deadzone, accelerate);
    moveMap.bind(%device, button0, shiftDown);
    moveMap.bind(%device, button1, shiftUp);
    moveMap.bind(%device, button2, parkingbrake_toggle);
    moveMap.bindCmd(%device, button3, "beamNGTogglePhysics();", "");
    
    
    echo("ThrustMaster NASCAR Charger loaded");
    
    ----EDIT----

    I solved it!

    add this to the beamng.cs file

    Code:
    function stick_accelerate_direct( %val ) {
       vlua("input.event(\'axisy0\', " @ %val @ ", 2)");
       vlua("input.event(\'axisy1\', " @ -%val @ ", 2)");
    }
    
    here is the new input map.
    Code:
    // product name: Thrustmaster NASCAR charger
    // GUID: {010E045E-0000-0000-0000-504944564944}
    // axes 3^Y^X^RZ
    
    
    $gp_deadzone = "-0.15 0.15";
    
    
    moveMap.bind(%device, xaxis, steer_direct);
    //moveMap.bind(%device, yaxis, "D", $gp_deadzone, brake_direct);
    //moveMap.bind(%device, yaxis, "ID", $gp_deadzone, accelerate_direct);
    moveMap.bind(%device, yaxis, "ID", $gp_deadzone, stick_accelerate_direct);
    moveMap.bind(%device, button0, shiftDown);
    moveMap.bind(%device, button1, shiftUp);
    moveMap.bind(%device, button2, parkingbrake_toggle);
    moveMap.bindCmd(%device, button3, "beamNGTogglePhysics();", "");
    
    
    echo("ThrustMaster NASCAR Charger loaded");
    
     
    #1 skyliner_369, Nov 30, 2013
    Last edited: Dec 2, 2013
  2. Chernobyl

    Chernobyl
    Expand Collapse

    Joined:
    Aug 26, 2013
    Messages:
    629
    i have no idea what this is ask gabester. Hes a pro
     
  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