Difference between revisions of "ScrollText"
Jump to navigation
Jump to search
m |
|||
Line 1: | Line 1: | ||
<lsl> | ==ScrollText== | ||
//ScrollText - using | <lsl>//ScrollText - using SetText to make a scroll effect.// | ||
//Written by Bios Winter & Kalie Denimore.// | //Written by Bios Winter & Kalie Denimore.// | ||
//Gutted by Strife Onizuka.// | |||
ScrollText(string text,integer letters){ | ScrollText(string text,integer letters){ | ||
integer length = llStringLength(text); | integer length = llStringLength(text); | ||
integer i | integer i = -1; | ||
letters -= 1; | |||
while((++i) < length){ | |||
llSetText( llGetSubString(text, i, i + letters), | |||
<1.0, 1.0, 1.0>, 1.0); | |||
llSleep(0.2); | |||
} | } | ||
llSetText("", <1.0, 1.0, 1.0>, 1.0); | |||
} | } | ||
Revision as of 22:36, 14 December 2008
ScrollText
<lsl>//ScrollText - using SetText to make a scroll effect.// //Written by Bios Winter & Kalie Denimore.// //Gutted by Strife Onizuka.// ScrollText(string text,integer letters){
integer length = llStringLength(text); integer i = -1; letters -= 1; while((++i) < length){ llSetText( llGetSubString(text, i, i + letters), <1.0, 1.0, 1.0>, 1.0); llSleep(0.2); } llSetText("", <1.0, 1.0, 1.0>, 1.0);
}
default{
state_entry(){ ScrollText("Hello, Avatar!",10); }
} </lsl>