Difference between revisions of "Play-sound-from-file"

From FreeSpace Wiki
Jump to: navigation, search
(Created page with 'Plays a sound file located in either the /sounds or /music folders. The SEXP must include the file extension, but not its location. You can set this SEXP to loop the sound file b…')
 
(this is no longer true)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Plays a sound file located in either the /sounds or /music folders. The SEXP must include the file extension, but not its location. You can set this SEXP to loop the sound file by giving a nonzero number as its second value.
+
Plays a sound file located in either the /sounds or /music folders. The SEXP needn't include the file extension, neither its location. You can set this SEXP to loop the sound file by giving a nonzero number as its second value.
  
 
Example:
 
Example:
  (play-sound-from-file "BattleMusic01.ogg" 1)
+
  (play-sound-from-file "BattleMusic01" 1)
 +
 
 +
Only one sound can be played by this SEXP at a time.
 +
 
 +
[[Category:SCP SEXPs]]

Latest revision as of 16:32, 13 March 2011

Plays a sound file located in either the /sounds or /music folders. The SEXP needn't include the file extension, neither its location. You can set this SEXP to loop the sound file by giving a nonzero number as its second value.

Example:

(play-sound-from-file "BattleMusic01" 1)

Only one sound can be played by this SEXP at a time.