GE Lua Documentation

Press F to search!

onVehicleActiveChanged

Definition


-- @/lua/ge/extensions/ui/console.lua:1178

local function refreshCombo()
  comboCtxTxt = "GE - Lua\0GE - TorqueScript\0CEF/UI - JS\0"
  local vehCount = be:getObjectCount()
  vehIds = {}
  if vehCount > 0  then
    local playerVehicle = getPlayerVehicle(0)
    if playerVehicle and playerVehicle:getActive() then
      comboCtxTxt = comboCtxTxt.."BeamNG - Current Vehicle "..vehStrInfo(playerVehicle)
      vehIds = {be:getPlayerVehicleID(0)}
    end
    for i=0,vehCount-1 do
      local v = be:getObject(i)
      if v:getActive() then
        table.insert(vehIds, v:getID())
        comboCtxTxt = comboCtxTxt.."BeamNG - "..vehStrInfo(v)
      end
    end
  end
  comboCtxTxt = comboCtxTxt.."\0"
end

Callers

@/lua/ge/extensions/gameplay/rally.lua

local function onVehicleActiveChanged(vehicleID, active)
  -- log('D', logTag, 'onVehicleActiveChanged')
@/lua/ge/extensions/gameplay/parking.lua

local function onVehicleActiveChanged(vehId, active)
  if vehPool and parkedVehData[vehId] then
@/lua/ge/extensions/freeroam/specialTriggers.lua

local function onVehicleActiveChanged(vehId, active)
  if not M.active then return end
@/lua/ge/extensions/core/vehicleActivePooling.lua

local function onVehicleActiveChanged(vehId, active)
  for _, pool in pairs(pools) do
@/lua/ge/extensions/core/trailerRespawn.lua

local function onVehicleActiveChanged(vehId, active)
  -- sets the vehicle's trailer visibility state to match the owner
@/lua/ge/extensions/gameplay/traffic.lua

local function onVehicleActiveChanged(vehId, active)
  if traffic[vehId] and traffic[vehId].isAi then
@/lua/ge/extensions/gameplay/rallyLoop.lua

-- local function onVehicleActiveChanged(vehicleID, active)
  -- log('D', logTag, 'onVehicleActiveChanged')