Difference between revisions of "Template:LSL Function"

From Second Life Wiki
Jump to navigation Jump to search
Line 1: Line 1:
<includeonly>
<noinclude>
{{lowercase|{{{name}}}}}
<pre>
__NOTOC__
{{LSL_Event
<div id="box" style="background:#ffdead;">
|func
&nbsp;&nbsp;'''WORK IN PROGRESS'''
|func_id
<div style="padding: 0.5em;background:#ffffff;">
|func_delay
''(This style and layout is presumed to be not finalized yet - this needs to be rather finalized first.)''
|func_desc
</div>
|return_type
</div>
|return_text
 
|p1_type|p1_name|p1_desc
{| width="100%"
|p2_type|p2_name|p2_desc
|-
|p3_type|p3_name|p3_desc
|
|p4_type|p4_name|p4_desc
{{LSLFunction|{{{name}}}|{{{1}}}|{{{2}}}|{{{3}}}|r={{{r}}}
|p5_type|p5_name|p5_desc
|p1={{{p1}}}|p1t={{{p1t}}}|p1d={{{p1d}}}
|p6_type|p6_name|p6_desc
|p2={{{p2}}}|p2t={{{p2t}}}|p2d={{{p2d}}}
|p7_type|p7_name|p7_desc
|p3={{{p3}}}|p3t={{{p3t}}}|p3d={{{p3d}}}
|p8_type|p8_name|p8_desc
|p4={{{p4}}}|p4t={{{p4t}}}|p4d={{{p4d}}}
|p9_type|p9_name|p9_desc
|p5={{{p5}}}|p5t={{{p5t}}}|p5d={{{p5d}}}
|p10_type|p10_name|p10_desc
|p6={{{p6}}}|p6t={{{p6t}}}|p6d={{{p6d}}}
|p11_type|p11_name|p11_desc
|p7={{{p7}}}|p7t={{{p7t}}}|p7d={{{p7d}}}
|p12_type|p12_name|p12_desc
|p8={{{p8}}}|p8t={{{p8t}}}|p8d={{{p8d}}}
|constants
|p9={{{p9}}}|p9t={{{p9t}}}|p9d={{{p9d}}}
|spec
|p10={{{p10}}}|p10t={{{p10t}}}|p10d={{{p10d}}}
|caveats
|p11={{{p11}}}|p11t={{{p11t}}}|p11d={{{p11d}}}
|examples
|p12={{{p12}}}|p12t={{{p12t}}}|p12d={{{p12d}}}
|helpers
|p13={{{p13}}}|p13t={{{p13t}}}|p13d={{{p13d}}}
|also_header
|also_functions
|also_articles
|also_footer
|notes
|mode
}}
}}
|-
</pre>
|
<div id="box">
== Specification ==
<div style="padding: 0.5em">
{{{specification}}}
</div>
</div>
|-
|
<div id="box">
== Caveats ==
<div style="padding: 0.5em">
{{{caveats}}}
</div>
</div>


|-
|
<div id="box">
== Examples ==
<div style="padding: 0.5em">
{{{examples}}}
</div>
</div>
|-
|
<div id="box">
== Helper Functions ==
<div style="padding: 0.5em">
{{{helpers}}}
</div>
</div>
|-
|
<div id="box">
== See Also ==
<div style="padding: 0.5em">
{{{seeAlso}}}
</div>
</div>
|-
|
<div id="box">
== Notes ==
<div style="padding: 0.5em">
{{{notes}}}
</div>
</div>
|}
</includeonly>
<noinclude>
=Experimental LSL Function Template=
This is an experimental template for the LSL function page format.
==Usage example:==
<div style="font-size:140%;"><pre><nowiki>
{{LSL_Function
{{LSL_Function
|name=llFunction|14|0.0|10.0
|func=MyFunction
|r=string
|func_id=-1
|p1=avatar
|func_sleep=100.5
|p1t=key
|func_energy=0.0
|p1d=This is a key parameter which expects to be passed a valid avatar key.
|func_desc=A fictitious function
|p2=widgets
|return_type=void
|p2t=integer
|return_text=(aka nadda, nothing).
|p2d=This is an integer parameter which indicates the number of widgets to process.
|p1_type=integer|p1_name=i|p1_desc
|p3=stickLength
|p2_type=float|p2_name=f|p2_desc
|p3t=float
|p3_type=string|p3_name=s|p3_desc
|p3d=This is a float parameter used to describe the length of the stick used to whack bad formatters.
|p4_type=key|p4_name=k|p4_desc
|tb=This function consumes widgets while it simultaneously animates a person whacking bad formatters.  The widgets are destroyed.  This is the lede. <!-- yes, lede is a word -->  (short high-level description of function, a few sentences to a paragraph)
|p5_type=list|p5_name=l|p5_desc
|specification=This function performs this specific set of actions under these circumstances.  If the key passed to it is [[NULL_KEY]], then it will [[shout]] "Nobody's whacking!" on channel 0.
|p6_type=vector|p6_name=v|p6_desc
|caveats=
|p7_type=rotation|p7_name=r|p7_desc
* Don't use this function to test whether a key is null.
|constants=constants
* ''(if you know of none, try using:)'' None known
|spec=spec
|examples=
|caveats=caveats
<lsl>
|examples=examples
default
|helpers=helpers
{
|also_header=also_header
    state_entry()
|also_events=*also_events
    {
|also_functions=*also_functions
        llSay(0,"The absolute value of -4 is: "+(string)llAbs(-4) );
|also_articles=*also_articles
    }
|also_footer=also_footer
}
|notes=notes
</lsl>
|mode
|helpers=
<lsl>
</lsl>
|seeAlso=
(similar [[LSL Functions|functions]], related [[LSL Examples|examples]] and pages, etc.)
|notes=
* (bulleted footnotes, if necessary - caveats should go in caveats section)
}}
}}
</nowiki></pre></div>
==Produces:==
----
{{LSL_Function|name=llFunction|14|0.0|10.0
|r=string
|p1=avatar
|p1t=key
|p1d=This is a key parameter which expects to be passed a valid avatar key.
|p2=widgets
|p2t=integer
|p2d=This is an integer parameter which indicates the number of widgets to process.
|p3=stickLength
|p3t=float
|p3d=This is a float parameter used to describe the length of the stick used to whack bad formatters.
|tb=This function consumes widgets while it simultaneously animates a person whacking bad formatters.  The widgets are destroyed.  This is the lede. <!-- yes, lede is a word -->  (short high-level description of function, a few sentences to a paragraph)
|specification=This function performs this specific set of actions under these circumstances.  If the key passed to it is [[NULL_KEY]], then it will [[shout]] "Nobody's whacking!" on channel 0.
|caveats=
* Don't use this function to test whether a key is null.
* ''(if you know of none, try using:)'' None known
|examples=
<lsl>
default
{
    state_entry()
    {
        llSay(0,"The absolute value of -4 is: "+(string)llAbs(-4) );
    }
}
</lsl>
|helpers=
<lsl>
</lsl>
|seeAlso=
(similar [[LSL Functions|functions]], related [[LSL Examples|examples]] and pages, etc.)
|notes=
* (bulleted footnotes, if necessary - caveats should go in caveats section)
}}
----
==Bugs==
==Suggested Changes==


</noinclude>
</noinclude><includeonly>
{{LSL Generic
|{{{func}}}|
|type=function
|header_desc={{{func_desc|}}}
|header_footnote={{{func_footnote|}}}
|deprecated={{{deprecated|}}}
|p1_type={{{p1_type|}}}|p1_name={{{p1_name|}}}|p1_desc={{{p1_desc|}}}
|p2_type={{{p2_type|}}}|p2_name={{{p2_name|}}}|p2_desc={{{p2_desc|}}}
|p3_type={{{p3_type|}}}|p3_name={{{p3_name|}}}|p3_desc={{{p3_desc|}}}
|p4_type={{{p4_type|}}}|p4_name={{{p4_name|}}}|p4_desc={{{p4_desc|}}}
|p5_type={{{p5_type|}}}|p5_name={{{p5_name|}}}|p5_desc={{{p5_desc|}}}
|p6_type={{{p6_type|}}}|p6_name={{{p6_name|}}}|p6_desc={{{p6_desc|}}}
|p7_type={{{p7_type|}}}|p7_name={{{p7_name|}}}|p7_desc={{{p7_desc|}}}
|p8_type={{{p8_type|}}}|p8_name={{{p8_name|}}}|p8_desc={{{p8_desc|}}}
|p9_type={{{p9_type|}}}|p9_name={{{p9_name|}}}|p9_desc={{{p9_desc|}}}
|p10_type={{{p10_type|}}}|p10_name={{{p10_name|}}}|p10_desc={{{p10_desc|}}}
|p11_type={{{p11_type|}}}|p11_name={{{p11_name|}}}|p11_desc={{{p11_desc|}}}
|p12_type={{{p12_type|}}}|p12_name={{{p12_name|}}}|p12_desc={{{p12_desc|}}}
|constants={{{constants|}}}
|spec={{{spec|}}}
|caveats={{{caveats|}}}
|examples={{{examples|}}}
|helpers={{{helpers|}}}
|also_header={{{also_header|}}}
|also_events={{{also_events|}}}
|also_functions={{{also_functions|}}}
|also_articles={{{also_articles|}}}
|also_footer={{{also_footer|}}}
|notes={{{notes|}}}
|mode={{{mode|}}}
|header_floater=<table>
<tr>
<td> {{HoverText|{{{func_id|}}}|The function index number.}}
<td> {{LSLG|Function ID}}
</tr>
<tr>
<td> {{HoverText|{{{func_delay|}}}|The number of seconds this script will sleep after executing this function.}}
<td> {{LSLG|Delay}}
</tr>
<tr>
<td> {{HoverText|{{{func_energy|}}}|The quantity of energy consumed by this function.}}
<td> {{LSLG|Energy}}
</tr>
</table>
}}</includeonly>

Revision as of 23:29, 27 January 2007

{{LSL_Event
|func
|func_id
|func_delay
|func_desc
|return_type
|return_text
|p1_type|p1_name|p1_desc
|p2_type|p2_name|p2_desc
|p3_type|p3_name|p3_desc
|p4_type|p4_name|p4_desc
|p5_type|p5_name|p5_desc
|p6_type|p6_name|p6_desc
|p7_type|p7_name|p7_desc
|p8_type|p8_name|p8_desc
|p9_type|p9_name|p9_desc
|p10_type|p10_name|p10_desc
|p11_type|p11_name|p11_desc
|p12_type|p12_name|p12_desc
|constants
|spec
|caveats
|examples
|helpers
|also_header
|also_functions
|also_articles
|also_footer
|notes
|mode
}}


Examples