llSetTimerEvent too fast

Creating scripts
Post Reply
User avatar
Mike Lorrey
Posts: 361
Joined: Sun Sep 04, 2016 5:40 pm
Has thanked: 71 times
Been thanked: 270 times

llSetTimerEvent too fast

Post by Mike Lorrey »

I am coding the new greeter board for the kitely welcome center, and am noticing that a 60 second timer event is tripping every 20 seconds at a minimum. When I first rez the board it goes into a paroxysm of timer cycles, i.e. more like 60 milliseconds rather than 60 seconds. If I log off and let the sim restart, it then defaults to the 20 second cycle behavior on a 60 second timer. Turning off mono doesn't seem to impact its behavior at all. I think that this may be the source of a number of region CPU load issues.
User avatar
Krull Kitty
Posts: 100
Joined: Thu Aug 06, 2020 1:25 pm
Has thanked: 39 times
Been thanked: 81 times

Re: llSetTimerEvent too fast

Post by Krull Kitty »

Have you tried using an absolute delay instead of a timer driven delay?

llSleep(5.0); //###<<< Put in a loop at 1 second intervals for an absolute 60 second pause.

Code: Select all

default
{
    state_entry()
    {
        llSay(0,"I going to take a nap for 5 seconds.");
        llSleep(5.0); 
        llSay(0,"I feel so refreshed!");
    }
}
Post Reply