User:Trinity Coulter/Random Message Script
< User:Trinity Coulter
Jump to navigation
Jump to search
Revision as of 14:13, 27 August 2008 by Trinity Coulter (talk | contribs) (New page: The following script will say a random message when clicked. <lsl> list manysayings = ["Message 1","Message 2","Message 3"]; float num_sayings; default { state_entry() { ...)
The following script will say a random message when clicked.
<lsl> list manysayings = ["Message 1","Message 2","Message 3"];
float num_sayings;
default {
state_entry() { num_sayings = llGetListLength(manysayings); }
touch_start(integer total_number) { integer saying2say = llFloor(llFrand(num_sayings));
llSay(0, llList2String(manysayings,saying2say)); }
} </lsl>