Play: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		 Note:If the file extension is omitted, .wav will be inferred.
Note:If the file extension is omitted, .wav will be inferred.
 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.
		
	
| m (Replacing {{console command}}. This operation was performed by a bot.) | SirYodaJedi (talk | contribs)  No edit summary | ||
| Line 8: | Line 8: | ||
| This will play the sound "stuck1.wav" in the folder "sound/common/". | This will play the sound "stuck1.wav" in the folder "sound/common/". | ||
| {{note|If  | {{note|If the file extension is omitted, [[.wav]] will be inferred.}} | ||
| {{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.}} | ||
| {{clarify|Does this work with [[soundscripts]], or only loose files?}} | |||
| = See also = | = See also = | ||
| * {{ent|playvol}} | * {{ent|playvol}} | ||
Latest revision as of 18:20, 16 September 2024
play  is a   console command  available in all  Source games.
 Source games.
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:If the file extension is omitted, .wav will be inferred.
Note:If the file extension is omitted, .wav will be inferred. 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.Clarify: Does this work with soundscripts, or only loose files?


























