Guest User

Untitled

a guest
Jul 29th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class LTTGMouseInput extends PlayerInput;
  2.  
  3. var PrivateWrite IntPoint MousePosition; // Stored mouse position. Set to private write as we don't want other classes to modify it, but still allow other classes to access it.
  4.  
  5. /***********************************************************
  6. ** PlayerInput                                            **
  7. ***********************************************************/
  8.  
  9. event PlayerInput(float DeltaTime)
  10. {
  11.          // Add the aMouseX & aMouseY to the mouse position and clamp it within the viewport width/height
  12.          MousePosition.X = Clamp(MousePosition.X + aMouseX, 0, myHUD.SizeX);
  13.          MousePosition.Y = Clamp(MousePosition.Y - aMouseY, 0, myHUD.SizeY);
  14.  
  15.          Super.PlayerInput(DeltaTime);
  16. }
  17.  
  18. /***********************************************************
  19. ** Exec Functions                                     **
  20. ***********************************************************/
  21.  
  22. exec function IncreaseCamZ()
  23. {
  24.     if (LTTGCamera(PlayerCamera).CamZ < 3000)
  25.     {
  26.         LTTGCamera(PlayerCamera).CamZ += LTTGCamera(PlayerCamera).CamZ * 1 / 10;
  27.     }
  28.  
  29.     if (LTTGCamera(PlayerCamera).CamZ >= 3000)
  30.     {
  31.         LTTGCamera(PlayerCamera).CamZ = 3000;
  32.     }
  33. }
  34. exec function DecreaseCamZ()
  35. {
  36.     if (LTTGCamera(PlayerCamera).CamZ > 1000)
  37.     {
  38.         LTTGCamera(PlayerCamera).CamZ -= LTTGCamera(PlayerCamera).CamZ * 1 / 10;
  39.     }
  40.  
  41.     if (LTTGCamera(PlayerCamera).CamZ <= 1000)
  42.     {
  43.         LTTGCamera(PlayerCamera).CamZ = 1000;
  44.     }
  45. }
  46.  
  47. /***********************************************************
  48. ** Default Properties                                     **
  49. ***********************************************************/
  50.  
  51. defaultproperties
  52. {
  53.  
  54. }
Add Comment
Please, Sign In to add comment