Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Timer & Sensor Trouble Last Few Months?

Michelle Morphett
Metamorph Maven
Join date: 27 Oct 2006
Posts: 28
02-10-2009 14:03
I've got a timer script and a sensor script running that used to be reliable, and suddenly for the last few months aren't triggering properly. Anybody have an idea if there's been a change that might be affecting them?

It's not the sim being reset ... the correct values are still stored in memory when I check on them, and the scripts seem to be running.

The first one checks the date every 86400 seconds (1 day), and does stuff it's the correct day of the month (like the 10th).


timer()
{
CurrentDate = llGetDate();
if(8 == llSubStringIndex(CurrentDate, payment_day))
{
DO STUFF
llSetTimerEvent(86400.0); //86400 seconds = 1 day
llResetTime();
}

else
{
llSetTimerEvent(86400.0);
llResetTime();
}
}


The second one scans the area every minute when an avatar is logged in to the object (a tip jar), and logs the person out if he's left.


state loggedin
{
state_entry()
{
llSensorRepeat("", LoggedAV, AGENT, 30.0, PI, 60.0);//#s = range in m and time in sec, searches sphere for logged-in avatar
}

no_sensor()
{
state loggedout;
}


Thanks for any help!
_____________________

Visit us at Undiscovered (128, 120, 403)
Nexii Malthus
[Cubitar]Mothership
Join date: 24 Apr 2006
Posts: 400
02-10-2009 14:08
Lag?

If a sim were at a constant 0.5 time dilation, that timer would take two days instead of one.

Otherwise I am not sure where to say.
_____________________

Geometric Library, for all your 3D maths needs.
https://wiki.secondlife.com/wiki/Geometric

Creator of the Vertical Life Client
Michelle Morphett
Metamorph Maven
Join date: 27 Oct 2006
Posts: 28
02-10-2009 14:17
Huh. Good point. I did put in a bunch of new affiliate vendors a few months ago, too. I'll check on that.

That shouldn't affect the sensor, though.
_____________________

Visit us at Undiscovered (128, 120, 403)
Lazink Maeterlinck
Registered User
Join date: 8 Nov 2005
Posts: 332
02-10-2009 14:24
Of course it would effect the sensor, even though it's a different timer type, it's still a timer.