Guest User

Untitled

a guest
May 21st, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.90 KB | None | 0 0
  1. // to be run in postthink??
  2.  
  3. void () TheQuestion =
  4. {
  5. local float = num;
  6. sprint(self.owner, #PRINT_LOW, "Are you ready to play?\n");
  7.  
  8. num = ResponseTest();
  9.  
  10. if(!num) return;
  11.  
  12. if (num == 1)
  13. sprint(self.owner, #PRINT_LOW, "Prepare for battle!\n");
  14.  
  15. else
  16. if (num == 2)
  17. sprint(self.owner, #PRINT_LOW, "Get lost then, wimp.\n");
  18.  
  19.  
  20. };
  21.  
  22.  
  23. float () ResponseTest =
  24. {
  25.  
  26.    
  27.     // get the difference between where we *were* looking and where we *are* looking.
  28.     deriv = self.angles - self.old_angles;
  29.    
  30.     // if we have a deriv value (not sure why we wouldnt..?)
  31.     //  AND where we are looking is not where we *were* looking
  32.     if (deriv && derive != self.old_deriv)
  33.         {
  34.        
  35.         if ( we have looked up and down /moved the mouse up and down in the last second)
  36.             return 1;
  37.         else
  38.         if ( we have looked left and right /moved the mouse left and right in the last second)
  39.             return 2;
  40.         else
  41.         return 0;
  42.  
  43.  
  44.  
  45. };
Add Comment
Please, Sign In to add comment