Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Clock Script - Was Working, Now Isn't

Brett Bjornson
Registered User
Join date: 8 Nov 2005
Posts: 25
04-04-2007 15:51
Several weeks ago I built a clock using the tutorial at

http://www.slbuilding.com/Clock_video.html

It worked fine. Now, however, the clock hands are appearing and disappearing at random. The prims the hands are on are still there; it seems like the texture is disappearing/appearing. Seemed to start with the last recommended upgrade to SL.

Here's the script for the minute hand

CODE

default
{
state_entry()
{
llSetTimerEvent(1);
}

timer()
{
float now = llGetWallclock();
integer minute = (integer)now / 60;
integer hour = minute / 60;
minute = minute - (hour * 60);

rotation hand_rot = llEuler2Rot(<0, 6 * minute * DEG_TO_RAD, 0>);

llSetLocalRot(hand_rot);

}

}


Any suggestions?
Twisted Pharaoh
if ("hello") {"hey hey";}
Join date: 24 Mar 2007
Posts: 315
04-04-2007 16:14
Copy this script into the clipboard, delete the script, create a new one, paste the clipboard into it, compile it and see if it works better.

I've got a few scripts to stop function, even the reset was not working, the only way was to regenerate them.
Sarah Showboat
Registered User
Join date: 3 Nov 2006
Posts: 13
Clock Scripts
04-04-2007 16:17
I've had lots of bad luck using llSetLocalRot.... my clocks would drift a little bit each day. I ended up using llSetTextureRotation and it has worked perfectly so far.