LSL Function Style/Celierra Darling

From Second Life Wiki
< LSL Function Style
Revision as of 10:52, 16 February 2007 by Celierra Darling (talk | contribs) (more additions)
Jump to navigation Jump to search


llExample
Returns:
boolean success
Parameters:
integer pokes
string descriptiveName
list parameterList
key target
vector position
Delay 0
Energy 10
Function ID -1
Works with:
llListen, llListenRemove, llListenControl (example for listen())

This page is in progress and nowhere near done yet

This is the lede and should give a short overview of the function. This LSL function takes in a number of pokes, a name for the animation, a list of parameters (see below table), the key of an avatar, and the position from which the giant hand should appear. It caused the specified damaged to be poked repeatedly, for massive damage.

Todo:

  • Finish everything
  • Templatize
  • Make sample text for a real function
  • Add cool things like
    • Detection of incomplete infoboxes
    • More modularity

Specification

The exact behavior of the function, its preconditions, postconditions, etc.

Ex. Channel number must be between x and y. Channel 0 is main, everyone can hear. Negatives are okay.

Parameter list

A table would go here.

Caveats

Common misunderstandings, mistakes, etc.

  • Listens are removed when changing state
  • The function returns a handle that should be used to manually remove the listen
  • Causes lag if you listen too many
  • Max number
  • etc.

Examples

Short examples, blah blah, should try to demonstrate all the caveats, though not necessarily in one script. Maybe some creative uses.

Notes

Anything obscure that isn't covered above.

Internal

Design document, functional spec, test scripts, related functions - for LL use, mostly (see how they did llEmail).

See Also