VE Lua Documentation

Press F to search!

publishStateEvent

Definition


-- @/lua/vehicle/controller.lua:1004

local function publishStateEvent(controllerName, ...)
  local c = getController(controllerName)
  if not c then
    log("E", "controller.stateEvent", string.format("Can't find controller '%s', ignoring state event.", controllerName))
    return
  end
  if not c.stateEvent then
    log("E", "controller.stateEvent", string.format("Controller '%s' does not support state events, ignoring state event.", controllerName))
    return
  end
  c.stateEvent(...)
end

Callers