Skip to content
lsl.devlsl.devLSL Dev

LlList2Rot

Looking for the current API? Open the llList2Rot reference →

Function notes

Return value notes

Returns a rotation that is at index in src.

Caveats

  • When used to typecast from a string it will result in a ZERO_ROTATION
    • A true typecast will solve this: (rotation)llList2String(src, index);
      • Unfortunately, if it was already a rotation type, using llList2String will cause the decimal values to be truncated to six decimal places.

Examples

// Best viewed in Chat History (ctrl-h)
default
{
    state_entry()
    {
        list my_list = ["a", 1, 2.0, <1,2,3>, <1,2,3,4>, llGetOwner()];
        integer i = ~llGetListLength(my_list);
        while (++i)
        {
            llOwnerSay("string=" + llList2String(my_list,i)
                        + "\n   integer=" + (string)llList2Integer(my_list,i)
                        + "\n   float=" + (string)llList2Float(my_list,i)
                        + "\n   vector=" + (string)llList2Vector(my_list,i)
                        + "\n   rot=" + (string)llList2Rot(my_list,i)
                        + "\n   key=" + (string)llList2Key(my_list,i) );
        }
    }
}

See also: functions

Shared wiki helpers

The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.

Template:Issues/SVC-798

Original shared helper source (conditional wiki logic is not evaluated)
{{Issues|SVC-798|Perform typecasting with all {{LSLGC|List/Read Element|llList2*}} functions|type=nf}}

Template:LSL VR

Original shared helper source (conditional wiki logic is not evaluated)
&lt;{{{1}}}{{#if:{{{2|}}}|, {{{2}}}{{#if:{{{3|}}}|, {{{3}}}{{#if:{{{4|}}}|, {{{4}}}{{#if:{{{5|}}}|, {{{5}}}}}}}}}}}&gt;

Template:HoverLink

Original shared helper source (conditional wiki logic is not evaluated)
[[{{{1|}}}|<span title="{{{2|}}}">{{{3|{{{1|}}}}}}</span>]]

Template:LSL Function/list/element

Original shared helper source (conditional wiki logic is not evaluated)
{{LSL Injection Test}}{{LSL_Function/negative index|true|{{{2|none_}}}}}{{#if:

{{#vardefine:p_{{{1|none}}}_desc|List containing the element of interest.}}

{{#vardefine:p_{{{2|none_}}}_desc|Index of the element of interest.}}

{{#vardefine:header_footnote|{{#if:{{{return|}}}|{{#if:{{#var:header_footnote}}|{{#var:header_footnote}}<br/>}}
If {{LSLP|{{{2|none}}}}} describes a location not in {{LSLP|{{{1|none}}}}} then {{{return|}}} is returned.{{#if:{{{3|}}}|<br/>
{{#if:{{{nc|}}}
|If the type of the element at {{LSLP|{{{2|none}}}}} in {{LSLP|{{{1|none}}}}} is not a [[{{{3|}}}{{#var:lang}}|{{{3|}}}]] then {{{return|}}} is returned. <br/>
Here is a workaround: <code>([[{{{3|}}}{{#var:lang}}|{{{3|}}}]])[[llList2String{{#var:lang}}|llList2String]]({{LSL Param|{{{1|none}}}}}, {{LSL Param|{{{2|none}}}}});</code>
|If the type of the element at {{LSLP|{{{2|none}}}}} in {{LSLP|{{{1|none}}}}} is not a [[{{{3|}}}{{#var:lang}}|{{{3|}}}]] it is [[typecast]] to a [[{{{3|}}}{{#var:lang}}|{{{3|}}}]]. {{#if:{{{nf|}}}||If it cannot be typecast {{{return|}}} is returned.}}}}}}|{{#var:header_footnote}}}}}}

}}<includeonly>{{LSLC|List/Read Element{{#var:lang}}}}</includeonly><noinclude>
{| {{Prettytable}}
|-{{Hl2}}
! #var
! value
|-
{{VarPair|p_{{{1|none}}}_desc}}
|-
{{VarPair|p_{{{1|none_}}}_desc}}
|-
{{VarPair|header_footnote}}
|-
{{VarPair|spec}}
|-
{{VarPair|constants_nb}}
|-
{{VarPairTable|also_articles}}
|}
</noinclude>
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.