Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Effects Progress_Bar  

Progress_Bar

http://zetaphor.wikidot.com/floating-text-progress-bar

Category: Effects
By : Zetaphor
Created: 2013-03-29 Edited: 2013-03-29
Worlds: Second Life

the Zip file

Download all files for Progress_Bar
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Progress_Bar_1.lsl
1
2 string empty = "â–¡";
3 string filled = "â– ";
4 integer value;
5 progressbar(float percent)
6 {
7 string progress; // moved so it does not have to be initted - fkb
8 integer x;
9 integer length = llFloor(percent/10);
10 while(x!=length)
11 {
12 progress+=filled;
13 x++;
14 }
15 while(x!=10)
16 {
17 progress+=empty;
18 x++;
19 }
20 integer dpercent = llFloor(percent);
21 llSetText((string)dpercent+"%\n"+progress,<1,1,1>,1);
22 }
23
24 default
25 {
26 touch_start(integer total_number)
27 {
28 llSetText("",<1,1,1>,1);
29 value=0;
30 llSetTimerEvent(0.1);
31 }
32
33 timer()
34 {
35 value++;
36 if(value<101)
37 {
38 progressbar(value);
39 }
40 else
41 {
42 llSay(0,"Completed!");
44 }
45 }
46 }

Back to the Best Free Tools in Second Life and OpenSim.