Advertisement
Guest User

Untitled

a guest
Oct 18th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. @name Sperm Pod
  2. @persist MaxEnts [Ar ID]:array [E Seat]:entity Tmr N Ang:angle Speed ChairOn
  3. @model models/hunter/blocks/cube1x1x025.mdl
  4.  
  5. #[
  6. --CONTROLS
  7. -Shift = Reduce Forwards Speed
  8. -W = Forwards
  9. -S = Backwards
  10. -A = Turn Left
  11. -D = Turn Right
  12. -Space = Pitch Up
  13. -Alt = Pitch Down
  14. ]#
  15.  
  16. if(first())
  17. {
  18. holoCreate(23000,entity():toWorld(vec(0,0,12)))
  19. holoModel(23000,"models/nova/airboat_seat.mdl")
  20. holoAng(23000,entity():toWorld(ang(0,90,0)))
  21. holoParent(23000,entity())
  22.  
  23. entity():setMass(50000)
  24. entity():propFreeze(0)
  25. entity():propGravity(0)
  26. entity():setColor(0,0,0,0)
  27.  
  28. runOnTick(1)
  29.  
  30. function entity:goto(Vector:vector)
  31. {
  32. This:applyForce(((Vector-This:pos())*10-This:vel())*This:mass())
  33. }
  34.  
  35. E = holoCreate(9001,entity():toWorld(vec(125,0,12)))
  36.  
  37. MaxEnts = 75
  38. for(I=1,MaxEnts)
  39. {
  40. holoCreate(I,E:toWorld(vec(10+(I-1)*20,0,0)))
  41. holoModel(I,"hq_sphere")
  42. holoScale(I,vec(20/8,((MaxEnts+1)-I)/MaxEnts,((MaxEnts+1)-I)/MaxEnts)*3.6)
  43. holoParent(I,I-1)
  44. holoColor(I,vec(255))
  45. holoDisableShading(I,1)
  46. }
  47. Tmr = 20
  48. timer("update",Tmr)
  49.  
  50. holoAlpha(9001,0)
  51. holoParent(9001,entity())
  52. holoCreate(9000,entity():toWorld(vec(0,0,12)))
  53. holoModel(9000,"hq_sphere")
  54. holoScale(9000,vec((72/6)*1.3,72/6,72/6))
  55. holoAlpha(9000,55)
  56. holoParent(9000,entity())
  57. holoCreate(9002,holoEntity(9001):toWorld(vec(-25,0,0)))
  58. holoModel(9002,"hq_rcylinder_thick")
  59. holoAng(9002,holoEntity(9001):toWorld(ang(90,0,0)) )
  60. holoScale(9002,vec(4.25,4.25,5))
  61. holoParent(9002,entity())
  62. holoDisableShading(9000,1)
  63. holoDisableShading(9001,1)
  64. holoDisableShading(9002,1)
  65. holoUnparent(1)
  66. holoParent(1,E)
  67. }
  68.  
  69. N+=3
  70. holoAng(9001,entity():toWorld(ang(0,cos(N)*7,0)))
  71.  
  72. if(clk("update"))
  73. {
  74. stoptimer("update")
  75. timer("update",Tmr)
  76.  
  77. Ar:unshiftAngle(E:angles())
  78.  
  79. for(I=1,MaxEnts)
  80. {
  81. holoAng(I,Ar[I,angle])
  82. }
  83.  
  84. if(Ar:count()>MaxEnts)
  85. {
  86. Ar:remove(MaxEnts+1)
  87. }
  88. }
  89.  
  90. if(ChairOn)
  91. {
  92. Driver = Seat:driver()
  93. W = Driver:keyForward()
  94. S = Driver:keyBack()
  95. A = Driver:keyLeft()
  96. D = Driver:keyRight()
  97. Space = Driver:keyJump()
  98. Alt = Driver:keyWalk()
  99. Shift = Driver:keySprint()
  100.  
  101. Ang = (ang((Space-Alt)*25,(A-D)*45 ,0))
  102. applyAngForce((Ang-entity():angVel()*0.5-(entity():angles():setPitch(0):setYaw(0)*3))*entity():mass())
  103.  
  104. if(W||S)
  105. {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement