placeGroup
Definition
-- @/lua/ge/extensions/core/multiSpawn.lua:642
local function placeGroup(vehIds, options) -- teleports a group of active vehicles into a new formation
if not vehIds or not vehIds[1] then return end
local transformData
local instant = options and options.instant
if options and type(options.customTransforms) == 'table' and #options.customTransforms >= #vehIds then
transformData = options.customTransforms
else
transformData = createSpawnPositions(#vehIds, options)
end
if not instant then
extensions.core_jobsystem.create(workPlaceVehicles, 1, vehIds, transformData, options)
else
workPlaceVehicles(nil, vehIds, transformData, options)
end
end
Callers
@/lua/ge/extensions/gameplay/traffic/trafficUtils.lua
options.gap = options.gap or 15
core_multiSpawn.placeGroup(gameplay_traffic.getTrafficAiVehIds(), options)
end
@/lua/ge/extensions/flowgraph/nodes/gameplay/traffic/trafficMoveGroup.lua
core_multiSpawn.placeGroup(self.vehIds, {mode = self.pinIn.spawnMode.value, gap = self.pinIn.spawnGap.value, pos = pos, rot = rot, instant = self.data.instantTeleport})
self.state = 1
@/lua/ge/extensions/gameplay/police.lua
core_multiSpawn.placeGroup(vehIds, {ignoreAdjust = true, ignoreSafe = true, customTransforms = transforms}) -- delays some frames to improve performance
end