LlListRandomize

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

Template:Needs Translation/


函数名
Function: list llListRandomize( list src, integer stride );
参数:

list src – A list you want to randomize. integer stride – number of entries per stride, if less than 1 it is assumed to be 1

返回值:

返回一个 src 随机排列的列表

注意事项
示例
示例一
list dice = ["2", "4", "1", "6", "3", "5"];
 
default
{
    touch_start(integer num_detected) {
        list shuffled = llListRandomize(dice, 1);
        llOwnerSay(llList2CSV(shuffled));
    }
}
list list01 = ["Cold", "pizza", "in", "the", "early", "morning"];
 
list list_random = llListRandomize(list01, 2);
list list_random = llListRandomize(list01, 6);
相关函数
llListSort

llFrand

相关事件