User Tools

Site Tools


play_sound

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
play_sound [2021/04/21 18:39] justinplay_sound [2024/01/31 13:39] justin
Line 6: Line 6:
 ====Signature:==== ====Signature:====
 <code python> <code python>
-play_sound(sound_name)+play_sound(sound_name, loop, interval)
 </code> </code>
  
 ^Argument^Description^Type^Required^ ^Argument^Description^Type^Required^
 |sound_name|Name of the sound effect to play.|[[String]]|Yes| |sound_name|Name of the sound effect to play.|[[String]]|Yes|
 +|loop|.|[[Boolean]]|No|
 +|interval|.|[[Number]]|No|
 +
 +^Return Value^Description^Type^
 +|Sound ID|Returns the actual number of [[item|items]] that were given to the player. This could be less than the count supplied to the function, for example if the player's [[inventory]] becomes full.|[[Number]]|
  
 <WRAP center round info 100%> <WRAP center round info 100%>
Line 18: Line 23:
 ====Example:==== ====Example:====
 <code bauxite> <code bauxite>
-play_sound("door_open");+play_sound("alarm", true, 1);
 </code> </code>
-//Results:// Plays the [[sound|sound effect]] named "door_openone time.+//Results:// Plays the [[sound|sound effect]] named "alarmonce per second until stopped.
  
 <WRAP center round tip 100%> <WRAP center round tip 100%>
play_sound.txt · Last modified: 2024/01/31 22:20 by justin