CL - AudioMgr - PlaySoundClip
Play a sound clip at a specific position.
#
ExamplePlay sound
local volume = 0.5local pitch = 1.0CL.AudioMgr.Instance:PlaySoundClip(self.soundName, self.soundPosition, false, volume, pitch)
Play sound with randomized pitch
local volume = 0.5local randomPitch = (math.random() + math.random(70, 130)) / 100CL.AudioMgr.Instance:PlaySoundClip(self.soundName, self.soundPosition, false, volume, randomPitch)
#
User VariablesComponent | variable |
---|---|
Addressable name of the sound. | self.soundName |
Vector3 | self.soundPosition |