I've just started to learn lua and Beamng modding. I want to check if the headlights are On or Off in a scenario. Current scenario's lua snippet : Code: local function onRaceTick(raceTickTime) local lveh = Lua:getControlVehicle() if lveh == nil then print("no vehicle got") end lveh:queueLuaCommand("print(electrics.values['lowhighbeam'])") end I get the current condition of the lights in the console. How can I get this in a variable?
Thanks devs: http://www.beamng.com/threads/a-way-to-get-a-value-from-system-lua-t3d-lua-gameengine-lua.25139/