Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- integer time_elapsed;
- float time = 5.0;
- key toucher;
- default
- {
- ¶touch_end(integer num)
- {
- toucher = llDetectedKey(0);
- time_elapsed = 0;
- llResetTime();
- llSetTimerEvent(1.0);
- }
- timer()
- {
- time_elapsed = llRound(llGetTime());
- string percentage = (string)(time_elapsed/time*100);
- integer idx = llSubStringIndex(percentage, ".");
- llSetText(llGetSubString(percentage,0,idx-1)+"%",<1.0,0.0,0.0>,1.0);
- if(time_elapsed == 5.0)
- {
- llGiveInventory(toucher, llGetInventoryName(INVENTORY_OBJECT, 0) );
- llSetTimerEvent(0.0);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement