Difference between revisions of "LSL Function Style/Celierra Darling"
m (fix up function stats) |
(→Notes: spelling, on second thought OK to have incomplete infoboxes...) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 39: | Line 39: | ||
--> | --> | ||
<!-- Infobox begin | <!-- Infobox begin | ||
(float:right | (float:right; clear:right; bg color all manually added due to lack of infobox CSS class) --> | ||
{| class="infobox" style="width: 20em; font-size: 95%; border-collapse: collapse; margin:0 0 1em 1em; float: right; clear: right" cellspacing="0" cellpadding="2" | {| class="infobox" style="width: 20em; font-size: 95%; border-collapse: collapse; margin:0 0 1em 1em; float: right; clear: right; background-color: #f9f9f9;" cellspacing="0" cellpadding="2" | ||
|+ style="font-size: larger;" | '''llExample''' | |+ style="font-size: larger;" | '''llExample''' | ||
<!-- Very short description --> | <!-- Very short description --> | ||
|- | |- | ||
| colspan="2" style="text-align:center" | Creates an annoying animation | | colspan="2" style="text-align:center; background-color: #FFFFFF" | Creates an annoying animation | ||
<!-- Return val --> | <!-- Return val --> | ||
|- style="border-top:1px solid #AAAAAA;" | |- style="border-top:1px solid #AAAAAA;" | ||
Line 128: | Line 128: | ||
* Make sample text for a real, complicated function | * Make sample text for a real, complicated function | ||
* Add cool things like | * Add cool things like | ||
** More modularity | ** More modularity | ||
** | ** Collapsible raw data tables | ||
== Internal == | == Internal == |
Latest revision as of 18:23, 23 February 2007
Creates an annoying animation | |
Returns: | |
boolean | success |
Parameters: | |
integer | pokes |
string | descriptiveName |
list | parameterList |
key | target |
vector | position |
Delay | 0 |
Energy | 10 |
Complexity | O(n3) (or n/a) |
Function ID | -1 |
Related to: | |
llListen, llListenRemove, llListenControl (example for listen()) llList2Integer, etc. (example for all those List2X functions) |
This page is in progress and nowhere near done yet
This is the lede (yes, lede is a word) 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 is under Notes.
Specification
The exact behavior of the function, its preconditions (how its arguments must be formatted and what it expects the world to look like), postconditions (how the return value is formatted), side effects (what happens in-world), etc.
Unlike lede paragraph, has less high-level abstraction and more nitty-gritty, corner cases, error conditions, etc.
Ex. Channel number must be between x and y. Channel 0 is main, everyone can hear. Negatives are okay, and only objects can speak to negative channels.
Parameter list
Constants, flags, etc, what is accepted into an ambiguously-typed parameter (lists, bitflags). Constants used in multiple places should be linked to their articles.
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 should go here too. Should avoid any script that uses many other functions - examples should probably be single-purpose for this specific function and be as clear as possible.
Notes
Anything obscure that isn't covered above. Whispers go 10m, normal talking goes 20m, shouting goes 100m.
Todo:
- Finish everything
- Templatize
- Make sample text for a real, complicated function
- Add cool things like
- More modularity
- Collapsible raw data tables
Internal
Design document, functional spec, test scripts, related functions - for LL use, mostly (see how they did llEmail).
See Also
- listen
- etc.
- ...
- A box with list of closely-related articles (especially for things like particles or listen)
- ...loosely-related articles (all string-manipulation, for example)
- ...major LSL (only function?) categories
- ...SL Wiki portals (?)
- (don't necessarily need this many boxes)
Categories go at the bottom (here).