CSoundPatch

From GMod Wiki

(Redirected from Csoundpatch)
Jump to: navigation, search

A CSoundPatch object is very much like the ambient_generic entity; you initialize the Sound Patch with the CreateSound function, and then you can play the sound using CSoundPatch.Play. At any time, you can change the pitch or the volume of the sound currently playing by using CSoundPatch.ChangePitch and CSoundPatch.ChangeVolume. When you're ready to stop the sound, you can use the CSoundPatch.Stop method to stop the sound.

The nature of this object makes it well suited to controlling looping sounds.

Object Commands

NewerShared.png CSoundPatch:__gc
NewerShared.png CSoundPatch:__index
NewerShared.png CSoundPatch:ChangePitch
NewerShared.png CSoundPatch:ChangeVolume
NewerShared.png CSoundPatch:FadeOut
NewerShared.png CSoundPatch:IsPlaying
NewerShared.png CSoundPatch:Play
NewerShared.png CSoundPatch:PlayEx
NewerShared.png CSoundPatch:SetSoundLevel
NewerShared.png CSoundPatch:Stop

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox