Solved Whats the {"simpleFunction": for ...

Discussion in 'Mod Support' started by schumacher, Apr 29, 2017.

  1. schumacher

    schumacher
    Expand Collapse

    Joined:
    Sep 1, 2013
    Messages:
    1,053
    Whats the {"simpleFunction": for too hot water and too hot oil temperature ? If I set the simple function to "watertemp" and "oiltemp" the warning light on the dash lights up but it lights up all the time and I'd like that it just glows up if the water/oil temperature gets too hot.
     
  2. thomatoes50

    thomatoes50
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 31, 2013
    Messages:
    695
    If you have a Lua file for your vehicle, you can add a value to electrics.
     
  3. schumacher

    schumacher
    Expand Collapse

    Joined:
    Sep 1, 2013
    Messages:
    1,053
    In the lua for the lcd display you've made for me there are a few lines with "electrics"

    Code:
    local function updateGFX(dt)
        timer = timer + dt
        dist = dist + (electrics.values.wheelspeed*dt or 0)
        
        if timer > 1 then
            timer=0
            runFunc( "updateValues(" .. dist ..", ".. (electrics.values.wheelspeed or 0)*3.6 ..", ".. (electrics.values.oiltemp or 0) ..", ".. (electrics.values.watertemp or 0) ..")" )
            runFunc( "updateConso(".. fuelOld ..", ".. (electrics.values.fuel or 0) ..", ".. dist-distconso ..")" )
            fuelOld = (electrics.values.fuel or 0)
            distconso = dist
        end
    What would I need to edit there?
     
  4. thomatoes50

    thomatoes50
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 31, 2013
    Messages:
    695
    Code:
    electrics.values.hotengine =  (electrics.values.oiltemp or 0)>120 or (electrics.values.watertemp or 0)> 120
    add this line after
    distconso = dist

    use the 'hotengine' as the glowmap function
     
  5. schumacher

    schumacher
    Expand Collapse

    Joined:
    Sep 1, 2013
    Messages:
    1,053
    Thank you, it's working now.
     
  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