Advertisement
Magnum_MacKivler

Pantograph (Modern) V1.0

Jul 9th, 2014
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. @name Pantograph
  2. @inputs Up MaxAng
  3. @outputs Height
  4. @persist T Color:vector E:entity
  5. @trigger
  6. @model models/hunter/plates/plate025x025.mdl
  7. if(first() | duped()){
  8. runOnTick(1)
  9. S = 1.5
  10.  
  11. E = entity()
  12. Color = vec(80,100,150)
  13. P = E:pos()
  14. A = E:angles()
  15. U = E:up()
  16. R = E:right()
  17. F = E:forward()
  18. AR = A:rotateAroundAxis(R,-90)
  19. AR2 = A:rotateAroundAxis(F,90)
  20. holoCreate(0,P+S*(24*F+2*U),S*vec(0.25,0.25,4),AR,Color,"hq_cylinder")
  21. holoCreate(1,P+S*(48*F+4*U),S*vec(0.5),A,Color,"cube")
  22. holoCreate(2,P+S*(24*F+6*U),S*vec(0.25,0.25,4),AR,Color,"hq_cylinder")
  23. holoCreate(3,P+S*(6*U),S*vec(0.5,0.5,0.25),A,Color,"cube")
  24. holoCreate(4,P+S*(8*U+3*F),S*vec(0.25,0.25,4),AR2,Color,"hq_cylinder")
  25. holoCreate(5,P+S*(8*U+-3*F),S*vec(0.25,0.25,4),AR2,Color,"hq_cylinder")
  26. holoCreate(6,P+S*(6*U+3*F+25.5*R),S*vec(0.25,0.25,0.5),A:rotateAroundAxis(F,-45),Color,"hq_cylinder")
  27. holoCreate(7,P+S*(6*U+3*F+-25.5*R),S*vec(0.25,0.25,0.5),A:rotateAroundAxis(F,45),Color,"hq_cylinder")
  28. holoCreate(8,P+S*(6*U+-3*F+25.5*R),S*vec(0.25,0.25,0.5),A:rotateAroundAxis(F,-45),Color,"hq_cylinder")
  29. holoCreate(9,P+S*(6*U+-3*F+-25.5*R),S*vec(0.25,0.25,0.5),A:rotateAroundAxis(F,45),Color,"hq_cylinder")
  30.  
  31. holoParent(0,E)
  32. holoParent(1,0)
  33. holoParent(2,1)
  34. holoParent(3,2)
  35. for(N=4,9){holoParent(N,3)}
  36. T = 0
  37.  
  38. for(N=0,9){
  39. holoMaterial(N,"sprops/textures/sprops_metal5")
  40. }
  41.  
  42. }
  43.  
  44. I = (Up - !Up)*0.5
  45.  
  46. P = E:pos()
  47. A = E:angles()
  48. U = E:up()
  49. R = E:right()
  50. F = E:forward()
  51.  
  52. if(!->MaxAng){MaxAng = 35}
  53.  
  54. T = clamp(T,0,MaxAng)
  55.  
  56. X = 24*cos(T)*F
  57. Z = 24*sin(T)*U
  58. holoPos(0,P+X+Z)
  59. holoAng(0,A:rotateAroundAxis(R,T-90))
  60. holoAng(1,A:rotateAroundAxis(R,-T))
  61. holoAng(3,A)
  62.  
  63. Height = floor(48*sin(T))
  64. T += I
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement