Don't click here unless you want to be banned.
LSL Wiki :
llListRandomize
HomePage
::
PageIndex
::
RecentChanges
::
RecentlyCommented
::
UserSettings
:: You are crawling22.us.archive.org
**##[[list]] llListRandomize([[list]] src, [[integer]] stride)##** Returns **##src##** randomized into blocks of size **##stride##**. If **##stride##** is less then one it is treated as ##1##. ""<!--If the length of the list is not cleanly divisible by **##stride##**, then the default value is returned.-->"" __Example:__ %%(lsl) // This shuffles each list item around. list foo = ["LSL", "is", "teh", "sucks"]; list bar = llListRandomize(foo, 1); llSay(0, llList2CSV(bar)); // This might make the object say "is, LSL, sucks, teh" or "LSL, sucks, // teh, is" or any of the other 22 combinations of possible lists. // This breaks the list up into two blocks and moves them around. list foo = ["LSL", "is", "teh", "sucks"]; list bar = llListRandomize(foo, 2); llSay(0, llList2CSV(bar)); // This might make the object say "LSL, is, teh, sucks" or "teh, sucks, LSL, is", // but nothing else would be possible. // This does nothing. list foo = ["LSL", "is", "teh", "sucks"]; list bar = llListRandomize(foo, 4); llSay(0, llList2CSV(bar)); // Object says "LSL, is, teh, sucks" %% For most purposes, setting **##stride##** to ##1## is probably what you want. This will just randomize all the items in the list. Compare with ##[[llListSort]]##. ---- [[list Lists]] | [[Functions]]
Valid XHTML 1.0 Transitional
::
Valid CSS
:: Powered by
WakkaWiki 0.1.2