Unsolved Some questions (lua and others problems)

Discussion in 'Mod Support' started by Raider, Apr 21, 2017.

  1. Raider

    Raider
    Expand Collapse

    Joined:
    Sep 23, 2013
    Messages:
    356
    I working on FR17 and I had some questions
    1. How to remove suspension sounds?
    2. Is possible to import race laps, race positions, race time etc. into my lua file and next to html file that i use for steering wheel screen?
    3. The same thing witch breakegroup, can i get the signal in lua when it's breaking (0 - 1)?
    sss.jpg
    4. I saw in new update "multi-breakgroup", it sound interesting, how it works?
    5. Why force feedback in wheel isn't smooth at all? feels like it's breaking up
     
  2. thomatoes50

    thomatoes50
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 31, 2013
    Messages:
    722
    2 - you can use
    Code:
    scenario.lapCount
    this value is nil if it's not a race, i think you should check if scenario isn't nil first. Note in quick play other values are used
    3 - I couldn't know when the breakgroup break so I check the length between nodes and if it's too important I say it's broken (check the lua of my C2/B2 mod)
     
  3. tdev

    tdev
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Aug 3, 2012
    Messages:
    3,031
    Be aware that the JSQueueUITexture was replaced. From the changelog:

    • Improved support for vehicle html textures: better interfaces createWebView, queueWebViewJS, UI logs will have an identifier now
     
    • Informative Informative x 1
  4. Raider

    Raider
    Expand Collapse

    Joined:
    Sep 23, 2013
    Messages:
    356
    I'm amator in this, i learned this on this mod https://www.beamng.com/threads/etk-i-3000-rsx.28593/
    It will be awesome if it will be a list of available function that i can use or it will be tutorial in wiki or you write me something more about that.
    My screen is working, but this happens :
    2222.png
     

    Attached Files:

  5. thomatoes50

    thomatoes50
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 31, 2013
    Messages:
    722
    • there isn't a function called updateWater in the html/javascript --> comment line 61 of the lua file
    • i think you can ignored the warnings from the rsx_dash file

    if you want to debug the html (if you know a bit) i recommend to use your normal browser (chrome in your case)

    In a snippet, call functions you are calling with the lua (runfunc) with fake news values

    I tested with those values
    HTML:
    updateSpeed(5)
    updateGear(2)
    updateRpm(8000)
    updateled_off1(true)
    And i get : Exception: TypeError: rpm_path is null dash.html:217:4
    i had to comment line 211 to 242
    and then i got this
    upload_2017-4-27_9-52-53.png
     
  6. thomatoes50

    thomatoes50
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 31, 2013
    Messages:
    722
    I assumed he still use old files that he will delete when release

    line 209 of dash.html document.getElementById('rpmnum').innerHTML = rpm;

    And I realised just after that in function updateRpm(rpm,rpmP,rpmC) (206) you don't send the rpmP and rpmC so you can remove them and the line that use those values.
     
  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