Lua:Electrics

Lua:Electrics

From BeamNG

Contains functions and attributes to control the electrical system.

File locations: lua\vehicle\electrics.lua

Attributes

table values = {}
table disabledState = {}

Member Functions

nil updateValue (func, smoothing)
nil generateBlinkPulse (dt)
nil rpmspinUpdate (dt)
nil update (dt)
nil reset ()
nil beamBroke (id) -- function body commented out.

Internal functions:

nil signalModeChanged ()

User input functions:

nil toggle_left_signal ()
nil toggle_right_signal ()
nil toggle_warn_signal ()
nil toggle_lights ()
nil setLightsState (newval)

Public Interface

  • update
  • toggle_left_signal
  • toggle_right_signal
  • toggle_warn_signal
  • toggle_lights
  • setLightsState
  • beamBroke
  • reset
  • init