Advertisement
C0BRA

fuck yeah

Dec 15th, 2012
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. self.CreateLink("gyro", "ei_sensor_")
  2. self.gyro = self.GetLink("gyro")
  3.  
  4. self.NextPrint = CurTime()
  5.  
  6. function Think()
  7.     if CurTime() > self.NextPrint then
  8.         self.NextPrint = CurTime() + 5
  9.        
  10.         if not self.gyro.Connected then
  11.             print("gyro not connected...")
  12.             return
  13.         end
  14.         print(self.gyro.Invoke("Orientation"))
  15.     end
  16. end
  17.  
  18. OUTPUT:
  19.  
  20. gyro not connected...
  21. Created link!
  22. 0.000 359.619 0.000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement