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.

Lua difficulties

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by Sjn212, Oct 26, 2014.

  1. Sjn212

    Sjn212
    Expand Collapse

    Joined:
    Dec 16, 2013
    Messages:
    26
    Hi, I've been toying around with vehicle specific lua scripts(like the Sunburst driver assists) and I'm having a few issues. Mainly whenever I try to retrieve lastSlip and slipEnergy from the drivetrain.wheels table, it always returns 0. Another issue is when I try to update differentials engineTorqueCoef(v.data.differentials table), it works but the game doesn't actually update the differentials with the new values. Am I doing something wrong?
     
  2. Sjn212

    Sjn212
    Expand Collapse

    Joined:
    Dec 16, 2013
    Messages:
    26
    Okay so I fixed the issues of the diffs not updating by making the updateDifferentials function in drivetrain.lua a global function and then calling it. Is there a way of doing this without editing vanilla lua files though?
     
    #2 Sjn212, Oct 28, 2014
    Last edited: Oct 28, 2014
  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