And you can do the same HOUR:MINUTES thing with just:<div><br></div><div>---</div><div><div>default</div><div>{</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>state_entry()</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>{</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>llSetTimerEvent(30); // Why every 2 seconds if you show minutes :)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>timer()</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>{</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>list timestamp = llParseString2List(llGetTimestamp(), ["-", ":"], ["T"]);</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>llSetText(llDumpList2String(llList2List(timestamp, 4, 5), ":"), <1,1,1>, 1);</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div>
<div>}</div><div>----</div><br><div class="gmail_quote">2011/3/16 InuYasha Meiji <span dir="ltr"><<a href="mailto:inuyasha.meiji@gmail.com">inuyasha.meiji@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#000000" text="#99ffff"><div><div></div><div class="h5">
On 3/16/2011 11:57 AM, Lindy McKeown wrote:
</div></div><blockquote type="cite"><div><div></div><div class="h5">
<p>Prims always remember floating text even after the script
creating it are removed. So to remove you have to put nothing
in the floating text. Then it will replace your time with
nothing and remember that when you remove the floating text
script. It allows you to label and unlabel items. Useful for
objects that give their contents so you don't also get the
floating text script given to you.<br>
Lindy </p>
</div></div><div class="gmail_quote"><div><div></div><div class="h5">On Mar 16, 2011 8:47 AM, "Robert Klein"
<<a href="mailto:rtkwebman@gmail.com" target="_blank">rtkwebman@gmail.com</a>>
wrote:<br type="attribution">
> I have a script that puts the current time floating above
an object. When I<br>
> remove the script from the object contents the text still
remains floating<br>
> above the object showing the time from when the script was
removed. The time<br>
> does not continue to update but it will not go away. Anyone
else have this<br>
> problem and if so how did you get the text to go away
without deleting the<br>
> object and starting over?<br>
> <br>
> Here is the script:<br>
> <br>
> // HoverText Clock Script<br>
> // By Ben Linden<br>
> //<br>
> // Drop on an object to make it display the PST time.<br>
> //<br>
> // If you are interested in scripting, check out<br>
> // the Script Help under the help menu.<br>
> <br>
> // The double slash means these lines are comments<br>
> // and ignored by the computer.<br>
> <br>
> <br>
> <br>
> <br>
> // Global Variables<br>
> // a string is a collection of characters.<br>
> string smin; // Represents minutes<br>
> string sseconds; //Represens seconds<br>
> <br>
> // All scripts have a default state, this will be<br>
> // the first code executed.<br>
> default<br>
> {<br>
> // state_entry() is an event handler, it executes<br>
> // whenever a state is entered.<br>
> state_entry()<br>
> {<br>
> // llSetTimerEvent() is a function that sets <br>
> // up a timer event in seconds.<br>
> llSetTimerEvent(2.0); // call a timer event <br>
> // every 2 seconds.<br>
> }<br>
> <br>
> <br>
> // timer() is an event handler, it executes on an<br>
> // interval defined by llSetTimerEvent()<br>
> timer()<br>
> {<br>
> // llFloor is a function that rounds down all numbers.<br>
> // llGetWallClock is a function that returns the time <br>
> // of day in seconds, on a 24 hour clock.<br>
> integer seconds = llFloor(llGetWallclock());<br>
> // Convert the total number of seconds into a integer
(whole number)<br>
> integer min = llFloor(seconds/60);<br>
> // Figure out how many minutes that is<br>
> seconds = seconds - (min*60);<br>
> //Work out the remaining number of seconds<br>
> integer hour = llFloor(min/60);<br>
> // figure out how many hours it represents.<br>
> min = min - (hour*60);<br>
> // figure out the number of minutes remaining<br>
> <br>
> // if is a conditional statement, it will only execute if
the<br>
> conditions are met. <br>
> if(hour > 12) {hour = hour - 12;} // if the hours are
greater than<br>
> 12, convert to 12 hour time<br>
> string shour = (string)hour; //convert the number into a
string<br>
> if(min < 10) {smin = "0"+(string)min;} // if less than
10 minutes,<br>
> put a 0 in the minute string<br>
> else { smin = (string)min;} <br>
> if(seconds < 10) { sseconds = "0"+(string)seconds;} //
if less than<br>
> 10 sec, put a 0 in the second string<br>
> else {sseconds = (string)seconds;}<br>
> <br>
> <br>
> string time = shour + ":" + smin; // build the seperate
strings into<br>
> a complete string, with colons<br>
> <br>
> // llSetText is a function that displays a string over the
object.<br>
> llSetText(time, ZERO_VECTOR, 1.0); //Display the string in
solid<br>
> black.<br>
> }<br>
> <br>
> }<br>
> <br>
> <br>
> Thanks,<br>
> <br>
> Robert<br></div></div><div class="im">
> ttps://<a href="http://lists.berlios.de/mailman/listinfo/opensim-users" target="_blank">lists.berlios.de/mailman/listinfo/opensim-users</a><br>
</div></div>
</blockquote>
Adding my two cents.,. This is also true for objects that produce
particle efects.<br>
<br>
-InuYasha<br>
<br>
<pre cols="72">--
________________________________________________________________
Opensim User: Standalone Grid on Version 0.7.0.2 with 49 Regions
On Windows 7, 64-bit. Quad Core With a Terrabyte Drive, and 8gig
Used XAMPP to load PHP Version 5.3.0, and MySQL 5.1.41-community
________________________________________________________________
</pre>
</div>
<br>_______________________________________________<br>
Opensim-users mailing list<br>
<a href="mailto:Opensim-users@lists.berlios.de">Opensim-users@lists.berlios.de</a><br>
<a href="https://lists.berlios.de/mailman/listinfo/opensim-users" target="_blank">https://lists.berlios.de/mailman/listinfo/opensim-users</a><br>
<br></blockquote></div><br></div>