Advertisement
Guest User

Untitled

a guest
Oct 20th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.15 KB | None | 0 0
  1. @name ArenaMaker3000
  2. @persist Yaw LastPos:vector Pitch Dead Size Model:string PreProp:entity Speed
  3.  
  4. if(!Dead)
  5. {
  6.     interval(10)
  7. }
  8. else
  9. {
  10.     runOnTick(1)
  11.     runOnChat(1)
  12. }
  13.  
  14. if(chatClk(owner()))
  15. {
  16.     P = owner():lastSaid():lower():explode(" ")
  17.     if(P[1, string] == "!speed")
  18.     {
  19.         Speed = P[2, string]:toNumber()
  20.     }
  21. }
  22. if(first())
  23. {
  24.     Speed = 0
  25.     Size = 32
  26.     #Model = "models/props_phx/construct/wood/wood_panel"+Size:toString()+"x"+Size:toString()+".mdl"
  27.     Model = "models/hunter/plates/plate"+Size:toString()+"x"+Size:toString()+".mdl"
  28.    
  29.     Pitch = -15
  30.    
  31.     holoCreate(1, entity():pos() + vec(0, 0, 1250/8*Size))
  32.     holoModel(1, Model)  
  33.     holoAng(1, ang())
  34.     holoCreate(2, entity():pos() + vec(0, 0, 100))
  35.     holoParent(2, 1)
  36.     holoAlpha(1, 0)
  37.     holoAlpha(2, 0)
  38.    
  39.     holoCreate(3, entity():pos())
  40.     holoAng(3, ang())
  41. }
  42.  
  43. while(propCanCreate() && perf() && !Dead)
  44. {
  45.     Yaw++
  46.     holoAng(1, ang(Pitch, Yaw, 0))
  47.     Angle = (holoEntity(1):pos() - holoEntity(2):pos()):toAngle() + ang(90, 0 ,0)
  48.     Pos = holoEntity(2):pos() - holoEntity(1):boxCenter():rotate(Angle)
  49.    
  50.     #if(Pos:distance(LastPos) >= 260/8*Size || first())
  51.     #if(Pos:distance(LastPos) >= 200/8*Size || first())
  52.     if(Pos:distance(LastPos) >= 200/8*Size || first())
  53.     {
  54.         E = propSpawn(Model, Pos, Angle, 1)
  55.         #if(PreProp:isValid()){ weld(E, PreProp) }
  56.         PreProp = E
  57.         LastPos = Pos
  58.        
  59.         #E:setMaterial("models/debug/debugwhite")
  60.         #E:setColor(hsv2rgb((Pitch / 180) * 360 + (abs(Yaw-180) / 180) * ((360/180)*180/(24 - sin(Pitch) * 13)), 1, 1))
  61.         #E:setAlpha(20)
  62.         #E:propNotSolid(1)
  63.         E:parentTo(holoEntity(3))
  64.         break
  65.     }
  66.    
  67.     if(Yaw >= 360)
  68.     {
  69.         Pitch += 180/(24 - sin(Pitch) * 13)
  70.         Yaw = 0
  71.         if(Pitch > 190) # 0  single prop, 180 full sphere, 90 half sphere, 45 quarter sphere, etc
  72.         #if(Pitch > 90) # 0  single prop, 180 full sphere, 90 half sphere, 45 quarter sphere, etc
  73.         {
  74.             Dead = 1
  75.         }
  76.     }
  77. }
  78.  
  79. if(Dead)
  80. {
  81.     holoAng(3, holoEntity(3):angles() + ang(0, Speed, 0))
  82. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement