GE Lua Documentation

Press F to search!

initExhaustSound

Definition


-- @/lua/ge/extensions/core/sounds.lua:93

local function initExhaustSound(vehicleId, engineId, jsonPath, nodeIdPairArray, noloadVol, loadVol)
  local vehicle = scenetree.findObjectById(vehicleId)
  if vehicle then
    if type(nodeIdPairArray) ~= 'table' then
      nodeIdPairArray = {{nodeIdPairArray, nodeIdPairArray}}
    end

    vehicle:engineSoundInit(engineId, jsonPath, nodeIdPairArray, noloadVol or 1, loadVol or 1)
    vehicle:engineSoundParameterList(engineId, {wet_level = 0, dry_level = 1})
  end
end

Callers

@/lua/vehicle/powertrain/combustionEngine.lua

local function initExhaustSound(device, soundID, samplePath, exhaustNodeIDPairs, offLoadGain, onLoadGain, reference)
  device.soundConfiguration[reference] = device.soundConfiguration[reference] or {}

  obj:queueGameEngineLua(string.format("core_sounds.initExhaustSound(%d,%d,%q,%s,%f,%f)", objectId, soundID, samplePath, serialize(exhaustNodeIDPairs), offLoadGain, onLoadGain))
end
        end
        device:initExhaustSound(device.engineSoundIDExhaust, samplePath, endNodeIDPairs, offLoadGain, onLoadGain, "exhaust")