This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
play_sound [2024/01/31 13:40] – justin | play_sound [2024/01/31 22:12] – justin | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- | ---- | ||
- | Plays the specified [[sound|sound effect]] once. | + | Plays the specified [[sound|sound effect]]. If the optional loop argument is set to true, the [[sound|sound effect]] will continue to play at the given interval of time (e.g. once per second) until stopped via the [[Stop Sound]] function. |
====Signature: | ====Signature: | ||
Line 10: | Line 10: | ||
^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|sound effect]] to play.|[[String]]|Yes| |
- | |loop|.|[[Boolean]]|No| | + | |loop|Whether or not the [[sound|sound effect]] will loop or play only once. When true, it will loop until stopped via the [[Stop Sound]] function.|[[Boolean]]|No| |
- | |interval|.|[[Number]]|No| | + | |interval|Interval of time to wait between each playing of the [[sound|sound effect]] (only applicable when the " |
^Return Value^Description^Type^ | ^Return Value^Description^Type^ | ||
- | |Sound ID|Returns | + | |Sound ID|Returns |
<WRAP center round info 100%> | <WRAP center round info 100%> | ||
Line 23: | Line 23: | ||
====Example: | ====Example: | ||
<code bauxite> | <code bauxite> | ||
- | play_sound(" | + | play_sound(" |
</ | </ | ||
- | // | + | // |
<WRAP center round tip 100%> | <WRAP center round tip 100%> |