GE Lua Documentation

Press F to search!

getTrafficList

Definition


-- @/lua/ge/extensions/gameplay/traffic.lua:97

local function getTrafficList() -- returns traffic list of ids
  return trafficAiVehsList
end

Callers

@/lua/ge/spawn.lua

  for _, otherId in ipairs(gameplay_traffic.getTrafficList()) do
    if otherId ~= vehID and (not map.isCrashAvoidable(otherId, bbCenter, vehRadius) or intersectingOtherVehicle(getObjectByID(otherId), axis0, axis1, axis2, halfExtentsX, halfExtentsY, halfExtentsZ, bbCenter)) then
    for vehId, veh in activeVehiclesIterator() do
      if vehId ~= newVehID and not (gameplay_traffic and removeTraffic and arrayFindValueIndex(gameplay_traffic.getTrafficList(), vehId)) then
        if intersectingOtherVehicle(veh, axis0, axis1, axis2, halfExtentsX, halfExtentsY, halfExtentsZ, newVehCenter) then
@/lua/ge/extensions/editor/trafficDebug.lua
    elseif trafficAmountChange[0] < 0 then
      local trafficAiVehsList = gameplay_traffic.getTrafficList()
      for i = trafficAmount, trafficAmount + trafficAmountChange[0], -1 do

  for _, id in ipairs(gameplay_traffic.getTrafficList()) do
    local veh = traffic[id]
@/lua/ge/extensions/career/modules/playerDriving.lua
local function setupTraffic(forceSetup)
  if forceSetup or (gameplay_traffic.getState() == "off" and not gameplay_traffic.getTrafficList(true)[1] and playerData.trafficActive == 0) then
    log("I", "career", "Now spawning traffic for career mode")
@/lua/ge/extensions/gameplay/missions/missionManager.lua
  if trafficSetup.useTraffic and trafficSetup.usePrevTraffic and gameplay_traffic.getState() == 'on' then -- use existing traffic
    for _, id in ipairs(gameplay_traffic.getTrafficList()) do
      taskData.data.mission.setupData.stashedVehicles[id] = nil
@/lua/ge/extensions/freeroam/crashCamMode.lua

  local trafficList = gameplay_traffic.getTrafficList()
  local parkedList = gameplay_parking.getParkedCarsList()
@/lua/ge/extensions/flowgraph/nodes/gameplay/traffic/trafficActivate.lua

  self.pinOut.vehicleIds.value = gameplay_traffic.getTrafficList()
end
@/lua/ge/extensions/career/career.lua
local function removeNonTrafficVehicles()
  local safeIds = gameplay_traffic.getTrafficList(true)
  safeIds = arrayConcat(safeIds, gameplay_parking.getParkedCarsList(true))
@/lua/ge/extensions/c2/panelPlugins/vehicleManager.lua
  if gameplay_traffic then
    local trafficIds = gameplay_traffic.getTrafficList()
    if trafficIds then