I think he's trying to simulate the high temperature warning light in the instrument panel. watertemp is the thermometer function (same as the coolant instrument gauge in the GUI), right?
Well, there is coolantTemperature variable in combustionEngineThermals.lua Problem is that I'm not aware how I could set or read variables in combustionEngineThermals.lua In guiSend there is coolantTemperature = M.coolantTemperature, which gets coolant temperature. M is from my limited understanding current program, that is combustionEngineThermals.lua In function reset there is M.coolantTemperature = startingTemperature With my limited understanding, I would think that there should be function coolantTemperature in combustionEngineThermals.lua because it is called with M like in M.coolantTemperature, but there is none, so this lua is not really quite working way I except, I know bit too little. However coolantTemperature seems to be what one needs to set, somehow, I don't know how. Or then set startingTemperature. Diamondback says everything is in electrics, but I know only of electrics.values and I can't get list of what is in there with print(electrics.values) because it wants to spit out table and that is not working. Even when I try print(electrics.values.waterTemp) it gives me NIL in vehicle lua. Would need to figure out bit more to give you anything useful, but if you figure out how to use coolantTemperature or waterTemp, I'm interested to hear how.
Aah, thanks from this, I learned new useful thing, so my world domination is again one step closer ... erm, just ignore that last part
Thank you all for trying to help me. I tried darrens method first. What I did is creating a new lua file with this code Code: local M = {} local function init() electrics.values.waterwarn = 0 end local function reset() init() end local function updateGFX(dt) if electrics.values.watertemp > 105 then electrics.values.waterwarn = 1 else electrics.values.waterwarn = 0 end end M.onInit = init M.onReset = init M.updateGFX = updateGFX return M Then I opened my jbeam file and replaced the "simpleFunction":"hotengine" with "electrics.values.watertemp" which gave me a fatal vehicle exception. I tried some others like 0, 1 and coolantTemperature but it's not working. I am convinced I just understood some steps wrong or so.
Thank you! It now works perfectly fine. I just created another lua file for the oil temperature and connected them to the glow map path and adjusted the temperatures.