Dusty_Wings

Holo Whip

Apr 9th, 2016
459
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
E 1.30 KB | None | 0 0
  1. @name Holo-Whip
  2. @persist T
  3. @model models/hunter/plates/plate025x025.mdl
  4. #runOnTick(1)
  5. interval(20)
  6. Kinks = 50
  7. KLength = 1
  8. Thick = 0.5
  9. Bend = 3
  10.  
  11. if(first())
  12. {
  13. #print(entity():boxSize():toString())
  14. for(I=1,30)
  15. {
  16.  
  17. holoCreate(I)  
  18. holoModel(I,"hqcylinder2")
  19. holoScale(I,vec(Thick,Thick,KLength))
  20. #A:pushEntity(holoEntity(I))
  21. if(holoEntity(I))
  22. {
  23. T++
  24. }
  25. else
  26. {
  27. break  
  28. }
  29. }
  30. #print(A:count():toString())
  31. }
  32.  
  33. if(T<Kinks)
  34. {
  35. #timer("c",1000)    
  36. #if(clk("c"))
  37. #{
  38. T++
  39. holoCreate(T)  
  40. holoModel(T,"hqcylinder2")
  41. holoScale(T,vec(Thick,Thick,KLength))    
  42. if(!holoEntity(T))
  43. {
  44. T--    
  45. }
  46.  
  47.    
  48. #}
  49.  
  50. }
  51.  
  52. for(I=1,Kinks)
  53. {
  54.  
  55. if(I==1)
  56. {
  57. holoPos(I,entity():pos()+entity():up()*6)    
  58.  
  59. Ang = (holoEntity(I+1):pos()-entity():pos()):toAngle()+ang(90,0,0)
  60. holoAng(I,Ang)
  61.  
  62. }
  63. elseif(I==Kinks)
  64. {
  65. holoPos(I,holoEntity(I-1):pos()+holoEntity(I-1):up()*KLength*12)
  66. Ang = (holoEntity(I-1):pos()-holoEntity(I):pos()):toAngle()+ang(90,0,0)
  67. holoAng(I,Ang)    
  68. }
  69. else
  70. {
  71. holoPos(I,holoEntity(I-1):pos()+holoEntity(I-1):up()*KLength*12)
  72. Ang = (holoEntity(I+1):pos()-holoEntity(I-1):pos()):toAngle()+ang(90,0,0)
  73. holoAng(I,Ang)
  74.  
  75. }  
  76.  
  77. #P = holoEntity(I):angles():pitch()/360*255
  78. #Y = holoEntity(I):angles():yaw()/360*255
  79. #R = holoEntity(I):angles():roll()/360*255
  80.  
  81. #holoColor(I,vec(P,Y,R))
  82. }
Add Comment
Please, Sign In to add comment