Advertisement
Hitmare

Untitled

Mar 10th, 2017
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. integer y = 1;
  2. float fTimer = 0.05;
  3. integer iSTATUS_TYPING = FALSE;
  4.  
  5. changestatus(integer iStatus_Typing)
  6. {
  7.     if (iStatus_Typing)
  8.     {
  9.         integer i = 1;
  10.         // Erste do while schleife
  11.         do
  12.         {
  13.             y = y + 1;
  14.             llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_ROT_LOCAL, llEuler2Rot(<90, y, 0> * DEG_TO_RAD)]);
  15.         }
  16.         while(iSTATUS_TYPING == TRUE);
  17.         //zweite do while schleife
  18.         do
  19.         {
  20.             y = 0;
  21.             llSetLocalRot(llEuler2Rot(<90, 0, 0> * DEG_TO_RAD));
  22.         }
  23.         while(iSTATUS_TYPING == FALSE);
  24.         //llTargetOmega(<0,1,0> * llGetLocalRot(),PI,1.0);
  25.     }
  26.     //if(iSTATUS_TYPING == TRUE
  27.     //{
  28.         //llTargetOmega( ZERO_VECTOR, 0, 0 );
  29.         //llSleep(0.2);
  30.         //llSetLocalRot(rot);
  31.         //llSetLocalRot(llEuler2Rot(<90, 0, 0> * DEG_TO_RAD));
  32.     //}
  33. }
  34.  
  35. checkTypeStatus()
  36. {
  37.     integer buf = llGetAgentInfo(llGetOwner());
  38.     if(buf & AGENT_TYPING && !iSTATUS_TYPING)
  39.     {
  40.         iSTATUS_TYPING = TRUE;
  41.         changestatus(TRUE);
  42.     }
  43.     else if (!(buf & AGENT_TYPING) && iSTATUS_TYPING)
  44.     {
  45.         iSTATUS_TYPING = FALSE;
  46.         changestatus(FALSE);
  47.     }
  48. }
  49.  
  50. default
  51. {
  52.     state_entry()
  53.     {
  54.         //rot = llGetLocalRot();
  55.         llSetTimerEvent(fTimer);
  56.     }
  57.  
  58.     timer()
  59.     {
  60.         checkTypeStatus();
  61.     }
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement