Advertisement
RedDeadlyCreeper

Arena APS e2

Feb 27th, 2017
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.37 KB | None | 0 0
  1. @name Arena APS
  2. @inputs Active Det Ar:array Cl
  3. @outputs
  4. @persist B [Ent]:entity [Banks Positions Angles Rem]:array A Trg:entity K
  5. @model
  6. @trigger
  7.  
  8. if(first()|dupefinished()){
  9. #Based on Rekless's AMPS
  10. Positions=array(
  11. vec(1,0,10.5),
  12. vec(1,0,11),
  13. vec(1,0,11.5),
  14. vec(1,0,12),
  15. vec(1,0,12.5),
  16. vec(1,0,13),
  17. vec(1,0,13.5),
  18. vec(1,0,14),
  19. vec(1,0,14.5),
  20. vec(1,0,15),
  21. vec(1,0,15.5),
  22. vec(1,0,16)
  23. )
  24.  
  25. Angles=array(
  26. ang(0,0,90),
  27. ang(0,0,90),
  28. ang(0,0,90),
  29. ang(0,0,90),
  30. ang(0,0,90),
  31. ang(0,0,90),
  32. ang(0,0,90),
  33. ang(0,0,90),
  34. ang(0,0,90),
  35. ang(0,0,90),
  36. ang(0,0,90),
  37. ang(0,0,90)
  38. )
  39.  
  40. findByClass("prop_phys")
  41. findIncludeModel("models/props_c17/streetsign004f.mdl")
  42. findInSphere(entity():pos(),50)
  43. Rem=findToArray()
  44. #print(Rem)
  45. if(Rem){
  46.  
  47. Rem:propDelete()
  48.  
  49. }
  50. entity():setAlpha(0)
  51. holoCreate(1)
  52. holoModel(1,"hq_cylinder")
  53. holoScale(1,vec(0.2,0.2,0.8))
  54. holoAng(1,entity():toWorld(ang(0,90,-45)))
  55. holoPos(1,entity():toWorld(vec(4,0,2)))
  56. holoColor(1,vec(50,75,30))
  57. holoMaterial(1,"sprops/textures/sprops_metal3")
  58. holoParent(1,entity())
  59.  
  60. holoCreate(2)
  61. holoModel(2,"hq_cylinder")
  62. holoScale(2,vec(0.2,0.2,0.8))
  63. holoAng(2,entity():toWorld(ang(10,90,20)))
  64. holoPos(2,entity():toWorld(vec(-2,-2,2)))
  65. holoColor(2,vec(50,75,30))
  66. holoMaterial(2,"sprops/textures/sprops_metal3")
  67. holoParent(2,entity())
  68.  
  69. holoCreate(3)
  70. holoModel(3,"hq_cylinder")
  71. holoScale(3,vec(0.2,0.2,0.8))
  72. holoAng(3,entity():toWorld(ang(-10,90,20)))
  73. holoPos(3,entity():toWorld(vec(-2,2,2)))
  74. holoColor(3,vec(50,75,30))
  75. holoMaterial(3,"sprops/textures/sprops_metal3")
  76. holoParent(3,entity())
  77.  
  78. holoCreate(4)
  79. holoModel(4,"hq_cylinder")
  80. holoScale(4,vec(0.4,0.4,1))
  81. holoAng(4,entity():toWorld(ang(0,0,0)))
  82. holoPos(4,entity():toWorld(vec(0,0,10)))
  83. holoColor(4,vec(50,75,30))
  84. holoMaterial(4,"sprops/textures/sprops_metal3")
  85. holoParent(4,entity())
  86.  
  87. holoCreate(5)
  88. holoModel(5,"models/sprops/geometry/hdisc_24.mdl")
  89. holoScale(5,vec(0.6,1.5,0.6))
  90. holoAng(5,entity():toWorld(ang(0,90,90)))
  91. holoPos(5,entity():toWorld(vec(4,0,12)))
  92. holoColor(5,vec(50,75,30))
  93. holoMaterial(5,"sprops/textures/sprops_metal3")
  94. holoParent(5,entity())
  95.  
  96. holoCreate(6)
  97. holoModel(6,"models/sprops/geometry/hhex_24.mdl")
  98. holoScale(6,vec(0.58,3,0.58))
  99. holoAng(6,entity():toWorld(ang(0,90,90)))
  100. holoPos(6,entity():toWorld(vec(3,0,18.5)))
  101. holoColor(6,vec(50,75,30))
  102. holoMaterial(6,"sprops/textures/sprops_metal3")
  103. holoParent(6,entity())
  104.  
  105. holoCreate(7)
  106. holoModel(7,"")
  107. holoScale(7,vec(0.4,1.16,1))
  108. holoAng(7,entity():toWorld(ang(0,0,0)))
  109. holoPos(7,entity():toWorld(vec(-2.4,0,17)))
  110. holoColor(7,vec(50,75,30))
  111. holoMaterial(7,"sprops/textures/sprops_metal3")
  112. holoParent(7,entity())
  113.  
  114. holoCreate(8)
  115. holoModel(8,"")
  116. holoScale(8,vec(0.6,1.2,0.38))
  117. holoAng(8,entity():toWorld(ang(0,0,0)))
  118. holoPos(8,entity():toWorld(vec(-2.4,0,12)))
  119. holoColor(8,vec(50,75,30))
  120. holoMaterial(8,"sprops/textures/sprops_metal3")
  121. holoParent(8,entity())
  122. findIncludeClass("acf_missile")
  123.  
  124. holoCreate(9)
  125. holoModel(9,"models/sprops/geometry/fhex_12.mdl")
  126. holoScale(9,vec(0.5,1,0.5))
  127. holoAng(9,entity():toWorld(ang(0,90,0)))
  128. holoPos(9,entity():toWorld(vec(5,0,17.5)))
  129. holoColor(9,vec(25,30,15))
  130. holoMaterial(9,"sprops/textures/sprops_metal3")
  131. holoParent(9,entity())
  132.  
  133. holoCreate(10)
  134. holoModel(10,"models/sprops/geometry/fhex_12.mdl")
  135. holoScale(10,vec(0.5,1,0.5))
  136. holoAng(10,entity():toWorld(ang(0,-30,0)))
  137. holoPos(10,entity():toWorld(vec(2.5,4.3,17.5)))
  138. holoColor(10,vec(25,30,15))
  139. holoMaterial(10,"sprops/textures/sprops_metal3")
  140. holoParent(10,entity())
  141.  
  142. holoCreate(11)
  143. holoModel(11,"models/sprops/geometry/fhex_12.mdl")
  144. holoScale(11,vec(0.5,1,0.5))
  145. holoAng(11,entity():toWorld(ang(0,30,0)))
  146. holoPos(11,entity():toWorld(vec(2.5,-4.3,17.5)))
  147. holoColor(11,vec(25,30,15))
  148. holoMaterial(11,"sprops/textures/sprops_metal3")
  149. holoParent(11,entity())
  150.  
  151. holoCreate(12)
  152. holoModel(12,"models/sprops/geometry/fhex_12.mdl")
  153. holoScale(12,vec(0.4,5,0.5))
  154. holoAng(12,entity():toWorld(ang(0,0,0)))
  155. holoPos(12,entity():toWorld(vec(-2.4,0,17.5)))
  156. holoColor(12,vec(25,30,15))
  157. holoMaterial(12,"sprops/textures/sprops_metal3")
  158. holoParent(12,entity())
  159. for(I=1,12){
  160. Banks:pushEntity(propSpawn("models/props_c17/streetsign004f.mdl",entity():toWorld(Positions[I,vector]),entity():toWorld(Angles[I,angle]),0))
  161. Banks[I,entity]:parentTo(entity())
  162. Banks[I,entity]:setAlpha(0)
  163. Banks[I,entity]:setMass(1)
  164. entity():setMass(10)
  165. }
  166.  
  167. A=1
  168. K=0
  169. #[ for(I=1,6){
  170. Banks[I,entity]:removeConstraint("Weld")
  171. }]#
  172. }
  173.  
  174.  
  175.  
  176. Trg=Ar[1,entity]
  177.  
  178. if(Active){
  179. Ent=Banks[A,entity]
  180.  
  181. if(Det & Cl){
  182. K=Trg:owner() != owner()
  183. if(!B & K){
  184. Ent:parentTo()
  185. B=1
  186. timer("S",10)
  187. entity():soundPlay(1,0,"acf_extra/cannons/mortars-launchers/mortar_81mm.wav")
  188. }
  189.  
  190. }
  191. if(clk("S")){
  192.  
  193. Ent:propFreeze(1)
  194. Ent:setPos(Trg:toWorld(vec(100,0,0)))
  195. Ent:setAng((Ent:pos()-Trg:pos()):toAngle()+ang(0,90,0))
  196. timer("A",1000)
  197. }
  198. if(clk("A")){
  199. Ent:propDelete()
  200. B=0
  201. A+=1
  202. }
  203. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement