Advertisement
Toastur

Toast's EOTD [Gmod E2]

Mar 22nd, 2017
440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.17 KB | None | 0 0
  1. @name Toast's EOTD
  2. @inputs
  3. @outputs Feet MPH LightToggle FlagType
  4. @persist O:entity E:entity LightToggle Light FlagType
  5. @trigger
  6. @model models/sprops/cuboids/height06/size_1/cube_6x24x6.mdl
  7. #[
  8. To operate the E2, pull out the crowbar.
  9. While holding the crowbar and aiming at the EOTD, press E to toggle the light,
  10. and alt fire to cycle flags.
  11. ]#
  12. if(first() | dupefinished()){
  13. E = entity()
  14. E:setAlpha(0)
  15. O = owner()
  16.  
  17. Color = vec(150,150,150)
  18.  
  19. A = 1
  20. holoCreate(A, entity():toWorld(vec(0,0,0)), vec(1),
  21. entity():toWorld(ang(0,0,0)))
  22. holoColor(A, Color)
  23. holoModel(A, "models/sprops/cuboids/height06/size_1/cube_6x24x6.mdl")
  24. holoScale(A, vec(1,1,0.7))
  25. holoParent(A, entity())
  26. holoMaterial(A,"WTP/metal_2")
  27.  
  28. A = 2
  29. holoCreate(A, entity():toWorld(vec(6.7,2.8,0)), vec(1),
  30. entity():toWorld(ang(0,0,90)))
  31. holoColor(A, vec4(30,30,30,255))
  32. holoModel(A, "models/sprops/cylinders/size_1/cylinder_1_5x3.mdl")
  33. holoScale(A, vec(0.6))
  34. holoParent(A, entity())
  35. holoMaterial(A,"WTP/metal_2")
  36.  
  37. A = 3
  38. holoCreate(A, entity():toWorld(vec(6,4.75,0)), vec(1),
  39. entity():toWorld(ang(0,90,90)))
  40. holoColor(A, vec4(30,30,30,255))
  41. holoModel(A, "models/sprops/misc/fittings/bend_long_90_1_5.mdl")
  42. holoScale(A, vec(0.6))
  43. holoParent(A, entity())
  44. holoMaterial(A,"WTP/metal_2")
  45.  
  46. A = 4
  47. holoCreate(A, entity():toWorld(vec(3.1,5.44,0)), vec(1),
  48. entity():toWorld(ang(0,90,90)))
  49. holoColor(A, vec4(30,30,30,255))
  50. holoModel(A, "models/sprops/cylinders/size_1/cylinder_1_5x12.mdl")
  51. holoScale(A, vec(0.6,0.6,0.3))
  52. holoParent(A, entity())
  53. holoMaterial(A,"WTP/metal_2")
  54.  
  55. A = 5
  56. holoCreate(A, entity():toWorld(vec(0.3,4.75,0)), vec(1),
  57. entity():toWorld(ang(0,180,90)))
  58. holoColor(A, vec4(30,30,30,255))
  59. holoModel(A, "models/sprops/misc/fittings/bend_long_90_1_5.mdl")
  60. holoScale(A, vec(0.6))
  61. holoParent(A, entity())
  62. holoMaterial(A,"WTP/metal_2")
  63.  
  64. A = 6
  65. holoCreate(A, entity():toWorld(vec(-0.41,2.8,0)), vec(1),
  66. entity():toWorld(ang(0,0,90)))
  67. holoColor(A, vec4(30,30,30,255))
  68. holoModel(A, "models/sprops/cylinders/size_1/cylinder_1_5x3.mdl")
  69. holoScale(A, vec(0.6))
  70. holoParent(A, entity())
  71. holoMaterial(A,"WTP/metal_2")
  72.  
  73. A = 7
  74. holoCreate(A, entity():toWorld(vec(4.5,0,1.1)), vec(1),
  75. entity():toWorld(ang(0,0,0)))
  76. holoColor(A, vec4(255,10,10,255))
  77. holoModel(A, "models/sprops/rectangles/size_1_5/rect_6x6x3.mdl")
  78. holoScale(A, vec(1.5,0.9,0.7))
  79. holoParent(A, entity())
  80. holoMaterial(A,"WTP/metal_2")
  81.  
  82. A = 8
  83. holoCreate(A, entity():toWorld(vec(-13,-1,0)), vec(1),
  84. entity():toWorld(ang(-90,0,0)))
  85. holoColor(A, vec4(30,30,30,255))
  86. holoModel(A, "models/sprops/misc/fittings/cred_3_1_5_tall.mdl")
  87. holoScale(A, vec(0.7))
  88. holoParent(A, entity())
  89. holoMaterial(A,"WTP/metal_2")
  90.  
  91. A = 9
  92. holoCreate(A, entity():toWorld(vec(-14,-1,0)), vec(1),
  93. entity():toWorld(ang(-90,0,0)))
  94. holoColor(A, vec4(30,30,30,255))
  95. holoModel(A, "models/sprops/geometry/sphere_3.mdl")
  96. holoScale(A, vec(0.35))
  97. holoParent(A, entity())
  98. holoMaterial(A,"WTP/metal_2")
  99.  
  100. A = 10
  101. holoCreate(A, entity():toWorld(vec(-12,1,0)), vec(1),
  102. entity():toWorld(ang(-90,0,0)))
  103. holoColor(A, vec4(30,30,30,255))
  104. holoModel(A, "models/sprops/cylinders/size_2/cylinder_3x3.mdl")
  105. holoScale(A, vec(0.5))
  106. holoParent(A, entity())
  107. holoMaterial(A,"WTP/metal_2")
  108.  
  109. A = 11
  110. holoCreate(A, entity():toWorld(vec(-4,0,1.1)), vec(1),
  111. entity():toWorld(ang(0,0,0)))
  112. holoColor(A, vec4(255,100,100,255))
  113. holoModel(A, "models/sprops/rectangles/size_1_5/rect_6x6x3.mdl")
  114. holoScale(A, vec(0.6,0.9,0.7))
  115. holoParent(A, entity())
  116. holoMaterial(A,"WTP/metal_2")
  117.  
  118. A = 12
  119. holoCreate(A, entity():toWorld(vec(-4,-1.5,2)), vec(1),
  120. entity():toWorld(ang(0,90,-90)))
  121. holoColor(A, vec4(10,10,10,255))
  122. holoModel(A, "models/sprops/misc/alphanum/alphanum_a.mdl")
  123. holoScale(A, vec(0.175))
  124. holoParent(A, entity())
  125. holoMaterial(A,"WTP/metal_2")
  126.  
  127. A = 13
  128. holoCreate(A, entity():toWorld(vec(-4,0,2)), vec(1),
  129. entity():toWorld(ang(0,90,-90)))
  130. holoColor(A, vec4(10,10,10,255))
  131. holoModel(A, "models/sprops/misc/alphanum/alphanum_t.mdl")
  132. holoScale(A, vec(0.175))
  133. holoParent(A, entity())
  134. holoMaterial(A,"WTP/metal_2")
  135.  
  136. A = 14
  137. holoCreate(A, entity():toWorld(vec(-4,1.5,2)), vec(1),
  138. entity():toWorld(ang(0,90,-90)))
  139. holoColor(A, vec4(10,10,10,255))
  140. holoModel(A, "models/sprops/misc/alphanum/alphanum_x.mdl")
  141. holoScale(A, vec(0.175))
  142. holoParent(A, entity())
  143. holoMaterial(A,"WTP/metal_2")
  144.  
  145. A = 15
  146. holoCreate(A, entity():toWorld(vec(-9,0,1.1)), vec(1),
  147. entity():toWorld(ang(0,0,0)))
  148. holoColor(A, vec4(200,200,200,50))
  149. holoModel(A, "models/sprops/rectangles/size_1_5/rect_6x6x3.mdl")
  150. holoScale(A, vec(0.6,0.6,0.7))
  151. holoParent(A, entity())
  152. holoMaterial(A,"WTP/metal_2")
  153.  
  154. A = 16
  155. holoCreate(A, entity():toWorld(vec(-9,0,2.3)), vec(1),
  156. entity():toWorld(ang(0,0,0)))
  157. holoColor(A, vec4(255,0,0,0))
  158. holoModel(A, "plane")
  159. holoScale(A, vec(5))
  160. holoParent(A, entity())
  161. holoMaterial(A,"jazzie/light_glow01")
  162.  
  163. A = 17
  164. lightCreate(A)
  165. lightColor(A,vec(0))
  166. lightPos(A,entity():toWorld(vec(-9,0,3)))
  167. lightParent(A,entity())
  168.  
  169. A = 18
  170. holoCreate(A, entity():toWorld(vec(-15,3.75,0)), vec(1),
  171. entity():toWorld(ang(-90,0,0)))
  172. holoColor(A, vec4(30,30,30,0))
  173. holoModel(A, "models/sprops/cylinders/size_1/cylinder_1_5x30.mdl")
  174. holoScale(A, vec(0.5,0.5,0.5))
  175. holoParent(A, entity())
  176. holoMaterial(A,"WTP/metal_2")
  177.  
  178.  
  179. A = 19
  180. holoCreate(A, entity():toWorld(vec(-7,3.75,0)), vec(1),
  181. entity():toWorld(ang(-90,0,0)))
  182. holoColor(A, vec4(150,150,150,255))
  183. holoModel(A, "models/sprops/rectangles/size_1/rect_3x3x3.mdl")
  184. holoScale(A, vec(0.5,0.5,0.5))
  185. holoParent(A, entity())
  186. holoMaterial(A,"WTP/metal_2")
  187.  
  188. A = 20
  189. holoCreate(A, entity():toWorld(vec(30,3.75,0)), vec(1),
  190. entity():toWorld(ang(0,90,-90)))
  191. holoColor(A, vec4(250,250,250,0))
  192. holoModel(A, "models/props_fairgrounds/fairgrounds_flagpole01.mdl")
  193. holoScale(A, vec(0.1))
  194. holoParent(A, entity())
  195. holoMaterial(A,"models/debug/debugwhite")
  196. holoAnim(A,"idle")
  197. holoClipEnabled(A,1,1)
  198. holoClip(A,1,vec(0,0,40),vec(0,0,1),0)
  199.  
  200. A = 21
  201. holoCreate(A, entity():toWorld(vec(-23,3.75,0)), vec(1),
  202. entity():toWorld(ang(-90,0,0)))
  203. holoColor(A, vec4(255,255,255,0))
  204. holoModel(A, "models/sprops/cylinders/size_1/cylinder_1_5x3.mdl")
  205. holoScale(A, vec(0.52,0.52,0.52))
  206. holoParent(A, entity())
  207. holoMaterial(A,"models/props_gulch/gulch_crystal_white")
  208.  
  209.  
  210. }
  211. interval(100)
  212. VelL = -E:velL():z()
  213. MPH = abs(toUnit("mph",VelL))
  214. Feet = round(MPH*5280)
  215.  
  216. if(O:weapon():type()=="weapon_crowbar"){
  217. if(changed(O:keyUse()) &O:keyUse() & owner():aimEntity() == E){
  218. LightToggle = !LightToggle
  219. O:soundPlay(1,1,"buttons/button3.wav")
  220. }
  221.  
  222. if(changed(O:keyAttack2()) &O:keyAttack2() & owner():aimEntity() == E){
  223. FlagType++
  224. O:soundPlay(0,0,"buttons/lightswitch2.wav")
  225. if(FlagType > 3){FlagType = 0}
  226.  
  227. if(FlagType == 0){
  228. holoAlpha(18,0)
  229. holoAlpha(20,0)
  230. holoAlpha(21,0)
  231. }elseif(FlagType == 1){
  232. holoAlpha(18,255)
  233. holoColor(20, vec4(250,250,250,255))
  234. holoColor(21, vec4(250,250,250,255))
  235. }elseif(FlagType == 2){
  236. holoColor(20, vec4(250,0,0,255))
  237. holoColor(21, vec4(250,0,0,255))
  238. }elseif(FlagType == 3){
  239. holoColor(20, vec4(0,255,0,255))
  240. holoColor(21, vec4(0,255,0,255))
  241. }
  242. }
  243.  
  244. }
  245. if(LightToggle){
  246. timer("pulse",500)
  247. }else{stoptimer("pulse") Light = 0}
  248.  
  249.  
  250. if(clk("pulse")){Light = !Light}
  251.  
  252. holoColor(16, vec4(255,0,0,Light*250))
  253. lightColor(17,vec(Light*255,0,0))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement