Difference between revisions of "ScrollText"
Jump to navigation
Jump to search
(New page: ==llScrollText== <lsl> //LLScrollText - using llSetText to make a scroll effect.// //Writen by Bios Winter & Kalie Denimore.// llScrollText(string text,integer letters){integer length = l...) |
m (wasn't readable the other way...) |
||
Line 4: | Line 4: | ||
//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.// | ||
llScrollText(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 = | |||
//LLScrollText - using llSetText to make a scroll effect.// | |||
//Writen by Bios Winter & Kalie Denimore.// | |||
default | llScrollText(string text,integer letters){ | ||
{ | integer length = llStringLength(text); | ||
state_entry() | 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(){ | |||
llScrollText("Hello, Avatar!",10); | llScrollText("Hello, Avatar!",10); | ||
} | } | ||
} | } | ||
</lsl> | </lsl> |
Revision as of 18:37, 14 December 2008
llScrollText
<lsl>
//LLScrollText - using llSetText to make a scroll effect.// //Writen by Bios Winter & Kalie Denimore.//
//LLScrollText - using llSetText to make a scroll effect.// //Writen by Bios Winter & Kalie Denimore.// llScrollText(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(){ llScrollText("Hello, Avatar!",10); }
} </lsl>