Advertisement
salahzar

Script contatore da 1 a 10 con timer event

Apr 5th, 2013
400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. integer conta;
  2.  
  3. mostra(string s)
  4. {
  5.     llSetText( s, <1,1,1>, 1);
  6. }
  7.  
  8. default
  9. {
  10.     state_entry()
  11.     {
  12.         llSay(0, "Reset");
  13.         mostra("Toccami");
  14.     }
  15.     touch_start(integer count)
  16.     {
  17.         conta=1;
  18.        
  19.         mostra( "Iterazione "+(string)conta );
  20.        
  21.         llSetTimerEvent(2);
  22.     }
  23.    
  24.     timer()
  25.     {
  26.         conta++;
  27.         if(conta<=10)
  28.         {
  29.             mostra("Iterazione "+(string)conta);
  30.             return;
  31.         }
  32.        
  33.         mostra("");
  34.         llSetTimerEvent(0);
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement