GE Lua Documentation

Press F to search!

setVehicles

Definition


-- @/lua/ge/extensions/gameplay/drag/dragBridge.lua:260

M.setVehicles = function(vehicleIds)
  local dragData = gameplay_drag_general._getDragData()
  if not dragData then
    log("E", logTag, "No drag data available for setting vehicles")
    return
  end

  for _, data in ipairs(vehicleIds) do
    gameplay_drag_general._setupRacer(data.id, data.lane)
    if not dragData.racers[data.id] then
      log("E", logTag, "There is a problem with the vehicle setting, vehicle has not been set correctly.")
      return
    end
    dragData.racers[data.id].isPlayable = data.isPlayable
    if data.dial and data.dial > 0 then
      dragData.racers[data.id].timers.dial.value = data.dial
    end
  end
end

Callers

@/lua/ge/extensions/flowgraph/nodes/gameplay/dragRace/setDragVehicle.lua
  if #vehicleList == 0 then return end
  gameplay_drag_dragBridge.setVehicles(vehicleList)
  self.pinOut.flow.value = true
@/lua/ge/extensions/career/modules/vehiclePerformance.lua

      gameplay_drag_dragBridge.setVehicles(racers)
      -- put vehicle (or both vehicles) on the drag strip