Play: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
m (added console command template)
Line 1: Line 1:
{{lang|play|title=Play}}  
{{lang|play}}{{Console Command}}
{{syntax|play <sound_name>}}
{{syntax|play <sound_name>}}


Line 14: Line 14:
= See also =
= See also =
* {{ent|playvol}}
* {{ent|playvol}}
[[Category:Console Commands]]

Revision as of 16:54, 26 June 2023

English (en)Русский (ru)Translate (Translate)

Template:Console Command

Syntax: play <sound_name>

Play a sound where "sound_name" is the specified sound with the path from <sound/>.

Example: play "common/stuck1.wav" This will play the sound "stuck1.wav" in the folder "sound/common/".

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.

See also