This article's documentation is for anything that uses the Source engine. Click here for more information.

Playvol: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:playvol}} {{syntax|playvol <sound_name> <volume>}} Play a sound at a specified volume where "<code>sound_name</code>" is the specified sound with the path from...")
 
m (Replacing {{console command}}. This operation was performed by a bot.)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:playvol}}
{{this is a|console command|name=playvol}}
{{syntax|playvol <sound_name> <volume>}}
{{syntax|playvol <sound_name> <volume>}}


Line 11: Line 11:


{{warning|If you trigger this command from a map in Hammer editor, never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor in order to recover your map.}}
{{warning|If you trigger this command from a map in Hammer editor, never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor in order to recover your map.}}
[[Category:Console Commands]]

Latest revision as of 17:57, 7 January 2024

playvol is a console command available in all Source Source games. Syntax: playvol <sound_name> <volume>

Play a sound at a specified volume where "sound_name" is the specified sound with the path from <sound/> and where "volume" is between "0.0" and "1.0"

Example: playvol "common\stuck1.wav" "0.8" will play the sound "stuck1.wav" in the folder "sound/common/" at the volume of 0.8

Note.pngNote:If you omit the file extension, it will also works if the file is a .wav sound.
Warning.pngWarning:If you trigger this command from a map in Hammer editor, never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor in order to recover your map.