VE Lua Documentation

Press F to search!

playSoundOnceFollowNode

Definition


-- @/lua/vehicle/sounds.lua:169

local function playSoundOnceFollowNode(soundName, nodeID, volume, pitch, color, texture)
  pitch = pitch or 1
  if volume >= 0.01 and pitch >= 0.0039 then
    obj:playSFXOnceCT(soundName, nodeID, volume, pitch, color or 0, texture or 0)
  end
end

Callers

@/lua/vehicle/controller/bypassDampers.lua
      if soundSettings.emitValveSounds then
        sounds.playSoundOnceFollowNode(event, damper.soundNodeCid or 0, volume, 1, soundSettings.maxVolume, 1)
      end
@/lua/vehicle/powertrain/combustionEngine.lua
      if #device.engineBlockNodes >= 2 then
        sounds.playSoundOnceFollowNode("event:>Vehicle>Failures>engine_explode", device.engineBlockNodes[1], 1)
        if #device.engineBlockNodes >= 2 then
          sounds.playSoundOnceFollowNode("event:>Vehicle>Failures>engine_explode", device.engineBlockNodes[1], 1)
@/lua/vehicle/fire.lua
              if fireballSoundTimer >= fireballSoundDelay then
                sounds.playSoundOnceFollowNode("event:>Vehicle>Fire>Fire_Ignition", mycid, 3)
              end
      beamstate.deflateTire(wheelData.wheelID, 1)
      sounds.playSoundOnceFollowNode("event:>Vehicle>Fire>Fire_Ignition", mycid, 2)
      --puff of flame on tire burst
@/lua/vehicle/material.lua
        --sounds.playSoundOnceAtNode(dm.deformSound, beam.id1, dm.deformVolume or 1)   --play the deform sound
        sounds.playSoundOnceFollowNode(dm.deformSound, beam.id1, (dm.deformVolume or 1) * 0.5)
        --print ((dm.deformVolume or 1) * 0.5)
@/lua/vehicle/powertrain/combustionEngineThermals.lua
      --make a knocking sound if the bearings are damaged
      sounds.playSoundOnceFollowNode("event:>Vehicle>Failures>failure_engine_knock", nodes.engine[1], 1)
    end
      --make a knocking sound if the bearings are damaged
      sounds.playSoundOnceFollowNode("event:>Vehicle>Failures>failure_engine_knock", nodes.engine[1], 1)
    end
      local tickSize = linearScale(randomGauss3(), 0, 3, 0, 1) ^ heatTickData.exhaustTickSizeBias
      sounds.playSoundOnceFollowNode(heatTickData.exhaustTickEventName, node, heatTickData.exhaustTickVolume, heatTickData.exhaustTickPitch, tickSize)
      heatTickData.exhaustTickBucket = 0
      local tickSize = linearScale(randomGauss3(), 0, 3, 0, 1) ^ heatTickData.engineTickSizeBias
      sounds.playSoundOnceFollowNode(heatTickData.engineTickEventName, node, heatTickData.engineTickVolume, heatTickData.engineTickPitch, tickSize)
      heatTickData.engineTickBucket = 0
@/lua/vehicle/controller/pyrotechnicCharge.lua
local function trigger()
  sounds.playSoundOnceFollowNode(eventName, eventNodeId, eventVolume, 1, 1, 1)
  for _, breakgroup in ipairs(breakgroups) do
@/lua/vehicle/sounds.lua
            -- print (string.format(" PLASTIC IMPACT / mat1=%.2d / mat2=%.2d / impactEnergy=%9.2f / breakEnergy=%9.2f / volImpact=%.3f  ", mat1, mat2, impactEnergy, breakEnergy, volImpact))
            sounds.playSoundOnceFollowNode(nodeImpactPlasticEvent, breakNode, volImpact)
          end
            --print (string.format("    PART IMPACT / mat1=%.2d / mat2=%.2d / impactEnergy=%9.2f / breakEnergy=%9.2f /                 / volImpact=%.3f  ", mat1, mat2, impactEnergy, breakEnergy, volImpact))
            sounds.playSoundOnceFollowNode(nodeImpactMetalEvent, breakNode, volImpact)
          end
            -- print (string.format(" GENERIC IMPACT / mat1=%.2d / mat2=%.2d / impactEnergy=%9.2f / breakEnergy=%9.2f /                 / volImpact=%.3f  ", mat1, mat2, impactEnergy, breakEnergy, volImpact))
            sounds.playSoundOnceFollowNode(nodeImpactGenericEvent, breakNode, volImpact)
          end
            --print(string.format("%d: Break Plastic (%.2f) -> %q", objectId, volBreak, nodeBreakPlasticEvent))
            sounds.playSoundOnceFollowNode(nodeBreakPlasticEvent, breakNode, volBreak)
          end
            --print(string.format("%d: Break Generic (%.2f) -> %q", objectId, volBreak, nodeBreakGenericEvent))
            sounds.playSoundOnceFollowNode(nodeBreakGenericEvent, breakNode, volBreak)
          end