CSoundPatch.ChangeVolume

From GMod Wiki

Jump to: navigation, search
Function
Syntax CSoundPatch:ChangeVolume( Float volume )
Description:
Changes the volume of the sound
Returns: nil
In Object: Csoundpatch
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=CSoundPatch.ChangeVolume]CSoundPatch.ChangeVolume [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionCreates a sound object attached to player 1 and changes its volume to 50%.
Used onNewerShared.png
Code
sound = CreateSound(player.GetByID(1),"npc/roller/mine/rmine_moveslow_loop1.wav");
sound:Play();
sound:ChangeVolume(0.5)
OutputThe attached sound to player will be half of normal volume.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox