Difference between revisions of "ScrollText"
Jump to navigation
Jump to search
m (LlScrollText moved to ScrollText: ll prefixed function articles are reserved for built-in functions.) |
m |
||
Line 1: | Line 1: | ||
<lsl> | <lsl> | ||
//LLScrollText - using llSetText to make a scroll effect.// | //LLScrollText - using llSetText to make a scroll effect.// | ||
//Writen by Bios Winter & Kalie Denimore.// | //Writen by Bios Winter & Kalie Denimore.// | ||
ScrollText(string text,integer letters){ | |||
integer length = llStringLength(text); | integer length = llStringLength(text); | ||
integer i ;string dtext; | integer i ;string dtext; | ||
Line 29: | Line 25: | ||
default{ | default{ | ||
state_entry(){ | state_entry(){ | ||
ScrollText("Hello, Avatar!",10); | |||
} | } | ||
} | } | ||
</lsl> | </lsl> |
Revision as of 22:19, 14 December 2008
<lsl>
//LLScrollText - using llSetText to make a scroll effect.// //Writen by Bios Winter & Kalie Denimore.// ScrollText(string text,integer letters){
integer length = llStringLength(text); integer i ;string dtext; for(i = 0;i != length;i++){ if(llStringLength(dtext) < letters){ dtext += llGetSubString(text,i,i); llSetText(dtext,<255,255,255>,1); llSleep(.2); } else{ dtext = llDeleteSubString(dtext,0,0); dtext += llGetSubString(text,i,i); llSetText(dtext,<255,255,255>,1);llSleep(.2); } if(i+1 == length){ llSetText("",<255,255,255>,1); } }
}
default{
state_entry(){ ScrollText("Hello, Avatar!",10); }
} </lsl>