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

From FreeSpace Wiki
Jump to: navigation, search
m (addition)
(this is no longer true)
 
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.
 
Only one sound can be played by this SEXP at a time.
  
 
[[Category:SCP SEXPs]]
 
[[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.