GE Lua Documentation

Press F to search!

processVehicles

Definition


-- @/lua/ge/extensions/gameplay/parking.lua:572

local function activate(vehIds, ignoreScatter) -- activates a group of vehicles, to allow them to teleport to new parking spots
  setState(true)
  if not sites or not vehIds then
    setState(false)
    return
  end

  for _, id in ipairs(vehIds) do
    insertVehicle(id)
  end

  if not parkedVehIds[1] then
    setState(false)
    return
  end

  if worldLoaded and not ignoreScatter then
    scatterParkedCars(vehIds)
  end

  extensions.hook("onParkingVehiclesActivated", parkedVehIds)

  local amount, activeAmount = getParkedCarsAmount(), getParkedCarsAmount(true)
  log('I', logTag, string.format('Parking system started with %d active / %d total vehicles', activeAmount, amount))
end

Callers

@/lua/ge/extensions/flowgraph/nodes/mission/preClean.lua
function C:workOnce()
  self.mgr.modules.mission:processVehicles({keepPlayer = self.pinIn.keepPlayer.value, keepTraffic = self.pinIn.keepTraffic.value})
  self.pinOut.vehId.value = self.mgr.modules.mission:getOriginalPlayerId() or be:getPlayerVehicleID(0)
@/lua/ge/extensions/flowgraph/modules/trafficModule.lua
function C:activateParkedCars(vehList)
  gameplay_parking.processVehicles(vehList)
  self:updateParkedCarsState()
  if self.parkedCarsActive then
    gameplay_parking.processVehicles()
    self:updateParkedCarsState()
@/lua/ge/extensions/flowgraph/modules/missionModule.lua

function C:processVehicles(params)
  local mission = self.mgr.activity