Progress Bar Script


This little script shows a progress bar as floating text.

Sending Inventory
[||||||||||………………..] 33%

showProgress(float value, float maximum, string status)
{
float percent = 0;
if(maximum != 0) percent = value / maximum;
integer barCount = 50;
integer bars = llFloor(percent * barCount);
llSetText( status + “n[” +
llGetSubString(
“||||||||||||||||||||||||||||||||||||||||||||||||||” +
“…………………………………………..”,
barCount – bars, -1 – bars)
+ “] ” + (string)llFloor(percent * 100) + “%”
, <1, 1, 1>, 1);
}

posted by Dedric Mauriac on Woodbridge using a blogHUD : [blogHUD permalink]

Comments are closed.

%d bloggers like this: