Difference between revisions of "User:Cow Taurog/Prim count"
Jump to navigation
Jump to search
Cow Taurog (talk | contribs) (create) |
Tomos Halsey (talk | contribs) m |
||
Line 1: | Line 1: | ||
Shows how many prims the parcel holds, and how many are left with hovertext. | Shows how many prims the parcel holds, and how many are left with hovertext. | ||
< | <source lang="lsl2"> | ||
vector gvColor=<0,0.5,1>; | vector gvColor=<0,0.5,1>; | ||
integer giMaxPrims; | integer giMaxPrims; | ||
Line 23: | Line 23: | ||
} | } | ||
} | } | ||
</ | </source> |
Latest revision as of 23:49, 22 July 2015
Shows how many prims the parcel holds, and how many are left with hovertext.
vector gvColor=<0,0.5,1>;
integer giMaxPrims;
integer giPrimCount;
integer giPrimsLeft;
float gfDelay=1;
default{
state_entry(){
giMaxPrims = llGetParcelMaxPrims(llGetPos(),FALSE);
giPrimCount = llGetParcelPrimCount(llGetPos(),0,FALSE);
giPrimsLeft = (giMaxPrims - giPrimCount);
llSetText((string)giPrimsLeft + " prims left.",gvColor,1);
llSetTimerEvent(gfDelay);
}
timer(){
giMaxPrims = llGetParcelMaxPrims(llGetPos(),FALSE);
giPrimCount = llGetParcelPrimCount(llGetPos(),0,FALSE);
giPrimsLeft = (giMaxPrims - giPrimCount);
llSetText((string)giPrimsLeft + " prims left.",gvColor,1);
}
}