Difference between revisions of "Category:LSL List/instructions"
m (Created page with "{{LSL Subtype Category|instructions|base=list|cat=|description=|inject=|values=}} A list of instructions when passed to a function tell the function what to do or how to configur…") |
m |
||
Line 4: | Line 4: | ||
Instruction lists are predominately are made of alternating commands and parameters. There are generally two types of instruction lists, those that configure (set functions) and those that query (get functions). The big difference between these two sets of functions is that the instruction lists used for querying take fewer parameters, the missing parameters are what the function returns (without the commands). | Instruction lists are predominately are made of alternating commands and parameters. There are generally two types of instruction lists, those that configure (set functions) and those that query (get functions). The big difference between these two sets of functions is that the instruction lists used for querying take fewer parameters, the missing parameters are what the function returns (without the commands). | ||
Examples | ===Examples=== | ||
<lsl>llSetPrimitiveParams([PRIM_OMEGA, <1,0,0>, 1.0, 1.0, PRIM_TEXT, "6 * 9 = 42", <1,1,1>, 0.5 ]);</lsl> | <lsl>llSetPrimitiveParams([PRIM_OMEGA, <1,0,0>, 1.0, 1.0, PRIM_TEXT, "6 * 9 = 42", <1,1,1>, 0.5 ]);</lsl> | ||
{|{{prettytable}} | {|{{prettytable}} | ||
Line 33: | Line 33: | ||
|} | |} | ||
<lsl>list params = llGetPrimitiveParams([PRIM_OMEGA, PRIM_COLOR, 0]);</lsl> | <lsl>list params = llGetPrimitiveParams([PRIM_OMEGA, PRIM_COLOR, 0]);</lsl> | ||
{|{{prettytable}} | {|{{prettytable}} |
Revision as of 11:48, 7 April 2014
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
- instructions is a subtype of list.
The functions and constants in this category all take or return an instructions parameter. Events in this category expose an instructions parameter.
A list of instructions when passed to a function tell the function what to do or how to configure the primitive, the object, or the world around them.
Instruction lists are predominately are made of alternating commands and parameters. There are generally two types of instruction lists, those that configure (set functions) and those that query (get functions). The big difference between these two sets of functions is that the instruction lists used for querying take fewer parameters, the missing parameters are what the function returns (without the commands).
Examples
<lsl>llSetPrimitiveParams([PRIM_OMEGA, <1,0,0>, 1.0, 1.0, PRIM_TEXT, "6 * 9 = 42", <1,1,1>, 0.5 ]);</lsl>
Command | Parameter Names | ||
---|---|---|---|
Parameter Values | |||
PRIM_OMEGA | vector axis | float spinrate | float gain |
<1,0,0> | 1.0 | 1.0 | |
PRIM_TEXT | string text | vector color | float alpha |
"6 * 9 = 42" | <1,1,1> | 0.5 |
<lsl>list params = llGetPrimitiveParams([PRIM_OMEGA, PRIM_COLOR, 0]);</lsl>
Command | Parameter Names | Return Names | |||||
---|---|---|---|---|---|---|---|
Parameter Values | Return Values | ||||||
PRIM_OMEGA | No parameters | vector axis | float spinrate | float gain | |||
<1,0,0> | 1.0 | 1.0 | |||||
PRIM_COLOR | integer face | vector color | float alpha | ||||
0 | <1.0, 0.5, 0.2> | 0.5 |
Pages in category "LSL List/instructions"
The following 26 pages are in this category, out of 26 total.