Difference between revisions of "User:Strife Onizuka/Sandbox/Switch/Template:Test"

From Second Life Wiki
Jump to navigation Jump to search
Line 1: Line 1:
{{LSL Header}} __NOTOC__ {{#vardefine:func_id|85}}{{#vardefine:p1_name|sound}}{{#vardefine:p1_type|string}}{{#vardefine:p1_desc|inventory name or [[UUID]]}}{{#vardefine:p2_name|volume}}{{#vardefine:p2_type|float}}{{#vardefine:p2_desc|between 0.0 (silent) and 1.0 (loud) (0.0 <= '''volume''' <= 1.0)}}{{#vardefine:p3_name|queue}}{{#vardefine:p3_type|integer}}{{#vardefine:p3_desc|boolean, weather or not to queue the song ({{LSLG|TRUE}}) or interrupt the playing song ({{LSLG|FALSE}}).}}{{#vardefine:p4_name|loop}}{{#vardefine:p4_type|integer}}{{#vardefine:p4_desc|boolean, weather or not to loop the song.}}{{#vardefine:p5_name|{{{p5_name|}}}}}{{#vardefine:p5_type|{{{p5_type|}}}}}{{#vardefine:p5_desc|{{{p5_desc|}}}}}{{#vardefine:p6_name|{{{p6_name|}}}}}{{#vardefine:p6_type|{{{p6_type|}}}}}{{#vardefine:p6_desc|{{{p6_desc|}}}}}{{#vardefine:p7_name|{{{p7_name|}}}}}{{#vardefine:p7_type|{{{p7_type|}}}}}{{#vardefine:p7_desc|{{{p7_desc|}}}}}{{#vardefine:p8_name|{{{p8_name|}}}}}{{#vardefine:p8_type|{{{p8_type|}}}}}{{#vardefine:p8_desc|{{{p8_desc|}}}}}{{#vardefine:p9_name|{{{p9_name|}}}}}{{#vardefine:p9_type|{{{p9_type|}}}}}{{#vardefine:p9_desc|{{{p9_desc|}}}}}{{#vardefine:p10_name|{{{p10_name|}}}}}{{#vardefine:p10_type|{{{p10_type|}}}}}{{#vardefine:p10_desc|{{{p10_desc|}}}}}{{#vardefine:p11_name|{{{p11_name|}}}}}{{#vardefine:p11_type|{{{p11_type|}}}}}{{#vardefine:p11_desc|{{{p11_desc|}}}}}{{#vardefine:p12_name|{{{p12_name|}}}}}{{#vardefine:p12_type|{{{p12_type|}}}}}{{#vardefine:p12_desc|{{{p12_desc|}}}}}{{#vardefine:return_type|{{#var:return_type}}{{{return_type|}}} }}{{#vardefine:return_text|{{#var:return_text}}{{{return_text|}}} }}{{#vardefine:name|llSound}}{{#vardefine:constants|{{#var:constants}}{{{constants|}}}}}{{#vardefine:spec|{{{spec|}}}}}{{#vardefine:examples|{{#var:examples}}{{{examples|}}}}}{{#vardefine:helpers|{{#var:helpers}}{{{helpers|}}}}}{{#vardefine:also_header|{{#var:also_header}}{{{also_header|}}}}}{{#vardefine:also_tests|{{#var:also_tests}}{{{also_tests|}}}}}{{#vardefine:also_events|{{#var:also_events}}{{{also_events|}}}}}{{#vardefine:also_functions|{{#var:also_functions}}{{{also_functions|}}}}}{{#vardefine:also_articles|{{#var:also_articles}}{{{also_articles|}}}}}{{#vardefine:also_footer|{{#var:also_footer}}{{{also_footer|}}}}}{{#vardefine:notes|{{#var:notes}}{{{notes|}}}}}{{#vardefine:mode|{{#var:mode}}{{{mode|}}}}}{{#vardefine:self|{{#var:self}}{{{self|}}}}}{{#vardefine:type|function}}{{#vardefine:template}}{{#vardefine:caveats|{{#ifexpr:0.0> 0.0|*This function causes the script to sleep for 0.0 seconds.}}{{#if:{{#var:caveats}}|{{#var:caveats}}}}{{{caveats|}}}}}{{#vardefine:location|{{#var:location}}{{{location|}}}}}{{#vardefine:sort|{{#if:{{#var:sort}}|{{#var:sort}}|{{#if:{{{sort|}}}|{{{sort}}}|{{#ifeq:{{#sub:{{#var:name}}|0|2}}|ll|{{#sub:{{#var:name}}|2}}|{{#var:name}}}}}}}}}}{{#vardefine:return_end|<nowiki>;</nowiki>}}{{#vardefine:header_footnote|{{{func_footnote|}}}{{{func_footer|}}}}}{{#vardefine:header_desc|Plays '''sound''' at '''volume''' and whether it should '''loop''' or not.}}{{#ifeq:{{#var:mode}}|god|{{{{#ifeq:{{#var:mode}}|god|LSL_Generic/god|!}}}} }}{{#ifeq:{{#var:mode}}|request|{{{{#ifeq:{{#var:mode}}|request|LSL_Generic/request|!}}}} }}{{#if:llPlaySound{{{depreciated|}}}|{{{{#if:llPlaySound{{{depreciated|}}}|LSL_Generic/deprecated|!}}|llPlaySound{{{depreciated|}}}|}}}}{{#if:sound|{{{{#if:sound|LSL_Function/inventory|!}}|sound|}}}}{{#if:{{{permission|}}}|{{{{#if:{{{permission|}}}|LSL_Function/permission|!}}|{{{permission|}}}|}}}}{{#if:{{{negative_index|}}}|{{{{#if:{{{negative_index|}}}|LSL_Function/negative_index|!}}|{{{negative_index|}}}|}}}}{{#if:{{#var:func_id}}{{#var:mode}}||
{{LSL Header}} __NOTOC__ {{#vardefine:func_id|85}}{{#vardefine:p1_name|sound}}{{#vardefine:p1_type|string}}{{#vardefine:p1_desc|inventory name or [[UUID]]}}{{#vardefine:p2_name|volume}}{{#vardefine:p2_type|float}}{{#vardefine:p2_desc|between 0.0 (silent) and 1.0 (loud) (0.0 &lt;= '''volume''' &lt;= 1.0)}}{{#vardefine:p3_name|queue}}{{#vardefine:p3_type|integer}}{{#vardefine:p3_desc|boolean, weather or not to queue the song ({{LSLG|TRUE}}) or interrupt the playing song ({{LSLG|FALSE}}).}}{{#vardefine:p4_name|loop}}{{#vardefine:p4_type|integer}}{{#vardefine:p4_desc|boolean, weather or not to loop the song.}}{{#vardefine:p5_name|{{{p5_name|}}}}}{{#vardefine:p5_type|{{{p5_type|}}}}}{{#vardefine:p5_desc|{{{p5_desc|}}}}}{{#vardefine:p6_name|{{{p6_name|}}}}}{{#vardefine:p6_type|{{{p6_type|}}}}}{{#vardefine:p6_desc|{{{p6_desc|}}}}}{{#vardefine:p7_name|{{{p7_name|}}}}}{{#vardefine:p7_type|{{{p7_type|}}}}}{{#vardefine:p7_desc|{{{p7_desc|}}}}}{{#vardefine:p8_name|{{{p8_name|}}}}}{{#vardefine:p8_type|{{{p8_type|}}}}}{{#vardefine:p8_desc|{{{p8_desc|}}}}}{{#vardefine:p9_name|{{{p9_name|}}}}}{{#vardefine:p9_type|{{{p9_type|}}}}}{{#vardefine:p9_desc|{{{p9_desc|}}}}}{{#vardefine:p10_name|{{{p10_name|}}}}}{{#vardefine:p10_type|{{{p10_type|}}}}}{{#vardefine:p10_desc|{{{p10_desc|}}}}}{{#vardefine:p11_name|{{{p11_name|}}}}}{{#vardefine:p11_type|{{{p11_type|}}}}}{{#vardefine:p11_desc|{{{p11_desc|}}}}}{{#vardefine:p12_name|{{{p12_name|}}}}}{{#vardefine:p12_type|{{{p12_type|}}}}}{{#vardefine:p12_desc|{{{p12_desc|}}}}}{{#vardefine:return_type|{{#var:return_type}}{{{return_type|}}} }}{{#vardefine:return_text|{{#var:return_text}}{{{return_text|}}} }}{{#vardefine:name|llSound}}{{#vardefine:constants|{{#var:constants}}{{{constants|}}}}}{{#vardefine:spec|{{{spec|}}}}}{{#vardefine:examples|{{#var:examples}}{{{examples|}}}}}{{#vardefine:helpers|{{#var:helpers}}{{{helpers|}}}}}{{#vardefine:also_header|{{#var:also_header}}{{{also_header|}}}}}{{#vardefine:also_tests|{{#var:also_tests}}{{{also_tests|}}}}}{{#vardefine:also_events|{{#var:also_events}}{{{also_events|}}}}}{{#vardefine:also_functions|{{#var:also_functions}}{{{also_functions|}}}}}{{#vardefine:also_articles|{{#var:also_articles}}{{{also_articles|}}}}}{{#vardefine:also_footer|{{#var:also_footer}}{{{also_footer|}}}}}{{#vardefine:notes|{{#var:notes}}{{{notes|}}}}}{{#vardefine:mode|{{#var:mode}}{{{mode|}}}}}{{#vardefine:self|{{#var:self}}{{{self|}}}}}{{#vardefine:type|function}}{{#vardefine:template}}{{#vardefine:caveats|{{#ifexpr:0.0> 0.0|*This function causes the script to sleep for 0.0 seconds.}}{{#if:{{#var:caveats}}|{{#var:caveats}}}}{{{caveats|}}}}}{{#vardefine:location|{{#var:location}}{{{location|}}}}}{{#vardefine:sort|{{#if:{{#var:sort}}|{{#var:sort}}|{{#if:{{{sort|}}}|{{{sort}}}|{{#ifeq:{{#sub:{{#var:name}}|0|2}}|ll|{{#sub:{{#var:name}}|2}}|{{#var:name}}}}}}}}}}{{#vardefine:return_end|<nowiki>;</nowiki>}}{{#vardefine:header_footnote|{{{func_footnote|}}}{{{func_footer|}}}}}{{#vardefine:header_desc|Plays '''sound''' at '''volume''' and whether it should '''loop''' or not.}}{{#ifeq:{{#var:mode}}|god|{{{{#ifeq:{{#var:mode}}|god|LSL_Generic/god|!}}}} }}{{#ifeq:{{#var:mode}}|request|{{{{#ifeq:{{#var:mode}}|request|LSL_Generic/request|!}}}} }}{{#if:llPlaySound{{{depreciated|}}}|{{{{#if:llPlaySound{{{depreciated|}}}|LSL_Generic/deprecated|!}}|llPlaySound{{{depreciated|}}}|}}}}{{#if:sound|{{{{#if:sound|LSL_Function/inventory|!}}|sound|}}}}{{#if:{{{permission|}}}|{{{{#if:{{{permission|}}}|LSL_Function/permission|!}}|{{{permission|}}}|}}}}{{#if:{{{negative_index|}}}|{{{{#if:{{{negative_index|}}}|LSL_Function/negative_index|!}}|{{{negative_index|}}}|}}}}{{#if:{{#var:func_id}}{{#var:mode}}||
<div id="box" style="background:red;">
<div id="box" style="background:red;">
&nbsp;&nbsp;'''Don't delete the 'func_id''''
&nbsp;&nbsp;'''Don't delete the 'func_id''''

Revision as of 14:54, 20 February 2007

Emblem-important.png Deprecated function
(This has been deprecated, please use llPlaySound instead.)

Function: llSound( string sound, float volume, integer queue, integer loop );

Function: llSound( string sound, float volume, integer queue, integer loop );
85 Function ID
0.0 Delay
10.0 Energy

Plays sound at volume and whether it should loop or not.

• string sound an item in the inventory of the prim this script is in
• float volume
• integer queue
• integer loop

Caveats

  • This has been deprecated, please use llPlaySound instead.
  • If sound is missing from the prim's inventory then an error is shouted on DEBUG_CHANNEL.

Examples