LlList2Rot

来自人工智能助力教育知识百科
跳转至: 导航搜索

Template:Needs Translation/


函数名
Function: rotation llList2Rot( list src, integer index );
参数:

list src – List containing the element of interest. integer index – Index of the element of interest.

返回值:

返回一个位于 src 索引处的旋转。

注意事项
*如果索引超出界限,脚本将继续执行,不会出现错误消息。
  • 当用于从字符串中进行类型转换时,将导致0 _ 旋转
  • 一个真正的类型转换可以解决这个问题: (rotation) lllist2string (src,index) ;
  • 不幸的是,如果它已经是一个旋转类型,使用 lllist2string 将导致小数值被截断为小数点后六位。
示例
示例一
/ 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) );
        }
    }
}
相关函数
llGetListEntryType

llList2String

相关事件