Solved How to make Check Engine Light come on with LUA?

Discussion in 'Mod Support' started by bluerider598, May 23, 2017.

  1. bluerider598

    bluerider598
    Expand Collapse

    Joined:
    Aug 13, 2016
    Messages:
    196
    Hi everyone. I have edited postCrashBrake.lua to make the engine shut off during any crash that triggers the postCrashBrake file. How do I also make the check engine light come on with a LUA command? Electrics.lua doesn't even mention the checkengine light.
     
    #1 bluerider598, May 23, 2017
    Last edited: May 23, 2017
  2. thomatoes50

    thomatoes50
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 31, 2013
    Messages:
    722
    you can create a new variable in electrics.values table
    Code:
    electrics.values.hotengine =  (electrics.values.oiltemp or 0)>120 or (electrics.values.watertemp or 0)> 120
    and you will be able to use the new values in the glowmap
     
  3. bluerider598

    bluerider598
    Expand Collapse

    Joined:
    Aug 13, 2016
    Messages:
    196
    Will that trigger the check engine light after I crash? Because I did some snooping around, and I found that if I can access the crashcounter variable in PostCrashBrake.lua, then I can easily make the check engine light come on and clear itself on vehicle reset. And what do you mean by a glowmap?
     
  4. thomatoes50

    thomatoes50
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 31, 2013
    Messages:
    722
    you use glow map to do lights on the dashboard.

    you need to use this
    Code:
    electrics.values.checkengine
    set it to 1 when you crashed, it should turn on
     
    • Agree Agree x 1
  5. Zaffir

    Zaffir
    Expand Collapse

    Joined:
    Jan 21, 2017
    Messages:
    70
    How can you add a new line
    --- Post updated ---
    How to add a new line in postcrashbrake.lua


    and where is glowmap file
     
  6. thomatoes50

    thomatoes50
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 31, 2013
    Messages:
    722
    It would have been better if you would have created a new thread and just link to this one instead of reviving an old one.
    you need to get it from the games files and you can copy it into your vehicle folder


    glowmap is not a file, it's a section inside a jbeam file (usually the main .jbeam eg: hatch.jbeam for the Ibishu Covet)
     
    • Informative Informative x 1
  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