VE Lua Documentation

Press F to search!

playSFX

Definition


-- @/=[C]:-1
function playSFX(...)

Callers

@/lua/vehicle/controller/pneumatics/actuators.lua
            obj:setVolume(g.soundLoopIncrease, g.volumeIncrease * volumeCoef)
            obj:playSFX(g.soundLoopIncrease)
            g.isPlayingIncrease = true
            obj:setVolume(g.soundLoopDecrease, g.volumeDecrease * volumeCoef)
            obj:playSFX(g.soundLoopDecrease)
            g.isPlayingDecrease = true
@/lua/vehicle/wheels.lua
          wd.tirePunctureLoop = obj:createSFXSource2(wd.tirePunctureSoundEvent, "AudioDefaultLoop3D", "", wd.node1, 0)
          obj:playSFX(wd.tirePunctureLoop)
        end
@/lua/vehicle/sounds.lua
    obj:cutSFX(sound)
    obj:playSFX(sound)
  end
@/lua/vehicle/powertrain/hydraulicPump.lua
  obj:setVolumePitchCT(device.pumpSound, 0, 0, 0, 0)
  obj:playSFX(device.pumpSound)
  device.pumpLoopStartStopEnabled = false
@/lua/vehicle/electrics.lua
    obj:setVolume(snd, 1)
    obj:playSFX(snd)
  else
    obj:setVolume(hornSound1, 1)
    obj:playSFX(hornSound1)
  else
@/lua/vehicle/controller/sound/reverseWarn.lua
        obj:cutSFX(beepLoop)
        obj:playSFX(beepLoop)
        isWarning = true
@/lua/vehicle/powertrain/combustionEngineThermals.lua
        obj:setVolumePitch(radiatorFanSound, radiatorFanVolume, 1)
        obj:playSFX(radiatorFanSound)
        radiatorFanElectricSoundPlaying = true
    if fluidLeakRates.coolant.previousOverall <= 0 and fluidLeakRates.coolant.overall > 0 then
      obj:playSFX(radiatorHissSound)
    end
    if radiatorFanType == "mechanical" then
      obj:playSFX(radiatorFanSound)
    end
@/lua/vehicle/controller/hydraulicSuspension.lua
      obj:cutSFX(pumpSoundLoop)
      obj:playSFX(pumpSoundLoop)
      isPumpSoundPlaying = true
@/lua/vehicle/controller/sound/linearMovement.lua
    if not isPlaying then
      obj:playSFX(movementSound)
      isPlaying = true
@/lua/vehicle/powertrain/compressor.lua
  device.compressorSoundVolume = jbeamData.compressorSoundVolume or 0.5
  obj:playSFX(device.compressorSound)
  obj:setVolumePitchCT(device.compressorSound, 0, 0, 0, 0)
@/lua/vehicle/controller/jato.lua
      obj:setVolume(thrusterLoops1[i], jatoInput)
      obj:playSFX(thrusterLoops1[i])
    end
@/lua/vehicle/controller/sound/AVAS.lua
    if desiredState == "playingForward" then
      obj:playSFX(forwardSound)
      obj:stopSFX(reverseSound)
    elseif desiredState == "playingReverse" then
      obj:playSFX(reverseSound)
      obj:stopSFX(forwardSound)
@/lua/vehicle/controller/pneumatics/lowAirPressureWarning.lua
    if lowAirWarningSoundEvent and not isPlayingLowPressureSound then
      obj:playSFX(lowAirWarningSoundEvent)
      guihooks.message("vehicle.pneumatics.lowAirPressureWarning", 3, "lowAirWarning")
@/lua/vehicle/powertrain/hydraulicCylinder.lua
    obj:setVolumePitchCT(cylinder.movementSound, 0, 0, 0, 0)
    obj:playSFX(cylinder.movementSound)
  end
@/lua/vehicle/fire.lua
      if not fireBurnSoundPlaying then
        obj:playSFX(fireBurnSoundObj)
        fireBurnSoundPlaying = true
@/lua/vehicle/controller/pneumatics.lua
      obj:cutSFX(groupData.soundLoopUp)
      obj:playSFX(groupData.soundLoopUp)
      groupData.isPlayingUp = true
      obj:cutSFX(groupData.soundLoopDown)
      obj:playSFX(groupData.soundLoopDown)
      groupData.isPlayingDown = true
        obj:cutSFX(groupData.soundLoopUp)
        obj:playSFX(groupData.soundLoopUp)
        groupData.isPlayingUp = true
        obj:cutSFX(groupData.soundLoopDown)
        obj:playSFX(groupData.soundLoopDown)
        groupData.isPlayingDown = true
@/lua/vehicle/powertrain/combustionEngine.lua
      obj:cutSFX(device.engineMiscSounds.shutOffSoundEngine)
      obj:playSFX(device.engineMiscSounds.shutOffSoundEngine)
    end
      obj:cutSFX(device.engineMiscSounds.shutOffSoundExhaust)
      obj:playSFX(device.engineMiscSounds.shutOffSoundExhaust)
    end
    obj:cutSFX(device.engineMiscSounds.starterSoundEngine)
    obj:playSFX(device.engineMiscSounds.starterSoundEngine)
      obj:cutSFX(device.engineMiscSounds.starterSoundExhaust)
      obj:playSFX(device.engineMiscSounds.starterSoundExhaust)
    end
@/lua/vehicle/powertrain/manualGearbox.lua
      device.gearGrindLoop:setVolumePitch(0, 0, 0, 0)
      obj:playSFX(device.gearGrindLoop.obj)
    end
@/lua/vehicle/powertrain/turbocharger.lua
      obj:cutSFX(bovSound)
      obj:playSFX(bovSound)
    else
      obj:cutSFX(flutterSound)
      obj:playSFX(flutterSound)
    end
@/lua/vehicle/powertrain/nitrousOxideInjection.lua
        obj:cutSFX(purgeSounds[k])
        obj:playSFX(purgeSounds[k])
      end