Difference between revisions of "Timer"

From Second Life Wiki
Jump to navigation Jump to search
(Example)
Line 4: Line 4:
|caveats
|caveats
|examples=<pre>
|examples=<pre>
integer counter = 0;
float gap = 2.0;
float counter = 0.0;


default
default
Line 11: Line 12:
     {
     {
         // Activate the timer listener every 2 seconds
         // Activate the timer listener every 2 seconds
         llSetTimerEvent(2);
         llSetTimerEvent(gap);
     }
     }


     timer()
     timer()
     {
     {
         counter = counter + 2;  
         counter = counter + gap;  
         llSay(0, (string)counter+" seconds are passed");
         llSay(0, (string)counter+" seconds have passed");
     }
     }
}
}

Revision as of 21:17, 16 April 2007