PlaySound(string)
Plays a sound on the client machine.
void PlaySound( string sSoundName );
Parameters
sSoundName
The name of the sound to play.
Description
Play the wave resource named sSoundName.
Remarks
PlaySound returns immediately, it does not wait for the sound to finish playing. If you want to play a sound using a trigger, then look at the SoundObjectPlay function, as PlaySound requires an object to work.
Version
1.22
Example
// Placed in the OnUsed event of the an object, for example a gong. The following script will cause a gong ring to sound. main() { PlaySound("as_cv_gongring2"); }
See Also
functions: | SoundObjectPlay |
categories: | Sound Effects Functions |
author: Tom Cassiotis, editor: Maximus
Send comments on this topic.