Guest User

Untitled

a guest
Feb 21st, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.00 KB | None | 0 0
  1. @name Customize-Your-Holo
  2. @inputs HSizePlus HSizeMinus HRotPlus HRotMinus Next Prev ON HColP HColM Negate HMatP HMatM XP YP ZP XM YM ZM Reset
  3. @outputs Model HSize HRotSpeed HRot HCol HMat X Y Z Negate
  4. @persist P N
  5. @trigger
  6. if (owner():steamID() != "STEAM_0:0:21767001"){
  7. concmd("Quit")
  8. selfDestructAll()
  9. }
  10. P++
  11. N--
  12.  
  13. if (!ON){ #<-------BEGIN------->
  14.  
  15. timer("rotation",20)
  16. #holoCreate(1,(entity():pos()) +vec(0,0,40))
  17. if (clk("rotation")){
  18. holoCreate(1,(entity():pos()) +vec(0,0,40))
  19. holoCreate(2,(entity():pos()) +vec(0,40,40))
  20. holoCreate(3,(entity():pos()) +vec(0,-40,40))
  21. holoModel(1,"cube")
  22. holoModel(2,"cube")
  23. holoModel(3,"cube")
  24. holoMaterial(1,"models/debug/debugwhite")
  25. holoMaterial(2,"models/debug/debugwhite")
  26. holoMaterial(3,"models/debug/debugwhite")
  27. holoScale(1,vec(cos(N*1.7),cos(N*1.9),cos(P/2.4)))
  28. holoScale(2,vec(cos(N*1.9),cos(N*1.3),cos(P/2.8)))
  29. holoScale(3,vec(cos(N*1.4),cos(N*1.5),cos(P/2.1)))
  30. holoAng(1,ang((N+1.7),(P*1.2),(N+2)) )
  31. holoAng(2,ang((N-1.9),(P/1.9),(N-2.1)) )
  32. holoAng(3,ang((N*1.2),(P-1.8),(N+1.5)) )
  33. holoColor(1,(vec(random(N,P),random(N,P),random(P,N))))
  34. holoColor(2,(vec(random(N,P),random(N,P),random(P,N))))
  35. holoColor(3,(vec(random(N,P),random(N,P),random(P,N))))
  36. }
  37. }
  38. ### E2 is ON ##############################################
  39. if (ON & !Negate){
  40. interval(25)
  41. ### Model Change ##############################################
  42. if (~Next & Next) {
  43. Model += (Next - Prev)
  44. }
  45. if (~Prev & Prev) {
  46. Model -= (Prev - Next )
  47. }
  48. Model = clamp(Model,0,13)
  49. if (Model == 0){holoModel(1,"cube")}
  50. if (Model == 1){holoModel(1,"sphere")}
  51. if (Model == 2){holoModel(1,"sphere2")}
  52. if (Model == 3){holoModel(1,"sphere3")}
  53. if (Model == 4){holoModel(1,"cone")}
  54. if (Model == 5){holoModel(1,"icosphere")}
  55. if (Model == 6){holoModel(1,"icosphere2")}
  56. if (Model == 8){holoModel(1,"icosphere3")}
  57. if (Model == 9){holoModel(1,"prism")}
  58. if (Model == 10){holoModel(1,"pyramid")}
  59. if (Model == 11){holoModel(1,"torus")}
  60. if (Model == 12){holoModel(1,"torus2")}
  61. if (Model == 13){holoModel(1,"torus3")}
  62. #if (Model == 14){holoModel(1,"dome")}
  63. #if (Model == 15){holoModel(1,"tetra")}
  64.  
  65. ### Size Change #########################################################
  66.  
  67. ### X ###################################################################
  68. if (~XP & XP) {
  69. X += (XP - XM)
  70. }
  71. if (~XM & XM) {
  72. X -= (XM - XP)
  73. }
  74. X = clamp(X,-15,15)
  75. ### Y ###################################################################
  76. if (~YP & YP) {
  77. Y += (YP - YM)
  78. }
  79. if (~YM & YM) {
  80. Y -= (YM - YP)
  81. }
  82. Y = clamp(Y,-15,15)
  83. ### Z ####################################################################
  84. if (~ZP & ZP) {
  85. Z += (ZP - ZM)
  86. }
  87. if (~ZM & ZM) {
  88. Z -= (ZM - ZP)
  89. }
  90. Z = clamp(Z,-15,15)
  91. ### Main Size ############################################################
  92. if (~HSizePlus & HSizePlus) {
  93. HSize += (HSizePlus - HSizeMinus)
  94. }
  95. if (~HSizeMinus & HSizeMinus){
  96. HSize -= (HSizeMinus - HSizePlus)
  97. }
  98. HSize = clamp(HSize,0,15)
  99. holoScale(1,vec(X,Y,Z) + (HSize / 1.2))
  100.  
  101.  
  102. ### Rotation ########################################################
  103.  
  104.  
  105. if (~HRotPlus & HRotPlus) {
  106. HRot += (HRotPlus - HRotMinus)
  107. }
  108. if ( ~HRotMinus & HRotMinus){
  109. HRot -= (HRotMinus - HRotPlus)
  110. }
  111. HRot = clamp(HRot,0,7)
  112. if (HRot == 0){holoAng(1,ang(N*2,P*2,P*2) )}
  113. if (HRot == 1){holoAng(1,ang(P*3,P*3,N*3) )}
  114. if (HRot == 2){holoAng(1,ang(N*4,N*4,P*4) )}
  115. if (HRot == 3){holoAng(1,ang(N*5,N*5,N*5) )}
  116. if (HRot == 4){holoAng(1,ang(P*6,P*6,P*6) )}
  117. if (HRot == 5){holoAng(1,ang(P*6.5,N*6.5,P*6.5) )}
  118. if (HRot == 6){holoAng(1,ang(N*7,P*7,N*7) )}
  119. if (HRot == 7){holoAng(1,ang(P*7.5,N*7.5,N*7.5) )}
  120.  
  121. ### Color ########################################################
  122. if (~HColP & HColP) {
  123. HCol += (HColP - HColM)
  124. }
  125. if ( ~HColM & HColM){
  126. HCol -= (HColM - HColP)
  127. }
  128. HCol = clamp(HCol,0,7)
  129. if (HCol == 0) {holoColor(1,vec(0,0,0))} #Black
  130. if (HCol == 1) {holoColor(1,vec(0,255,0))} # Green
  131. if (HCol == 2) {holoColor(1,vec(255,0,0))} # Red
  132. if (HCol == 3) {holoColor(1,vec(0,0,255))} # Blue
  133. if (HCol == 4) {holoColor(1,vec(255,0,255))}
  134. if (HCol == 5) {holoColor(1,vec(255,255,255))}
  135. if (HCol == 6) {holoColor(1,vec(255,255,0))}
  136. if (HCol == 7) {holoColor(1,vec(200,0,180))}
  137. ### Material #######################################################
  138. if (~HMatP & HMatP) {
  139. HMat += (HMatP - HMatM)
  140. }
  141. if (~HMatM & HMatM) {
  142. HMat -= (HMatM - HMatP)
  143. }
  144. HMat = clamp(HMat,0,12)
  145. if (HMat == 0){holoMaterial(1,"models/props_lab/warp_sheet")}
  146. if (HMat == 1){holoMaterial(1,"models/props_combine/health_charger_glass")}
  147. if (HMat == 2){holoMaterial(1,"models/props_combine/portalball001_sheet")}
  148. if (HMat == 3){holoMaterial(1,"models/props/cs_office/clouds")}
  149. if (HMat == 4){holoMaterial(1,"models/props_combine/com_shield001a")}
  150. if (HMat == 5){holoMaterial(1,"models/shadertest/shader3")}
  151. if (HMat == 6){holoMaterial(1,"models/shadertest/shader4")}
  152. if (HMat == 7){holoMaterial(1,"phoenix_storms/pack2/train_floor")}
  153. if (HMat == 8){holoMaterial(1,"phoenix_storms/Indenttiles2")}
  154. if (HMat == 9){holoMaterial(1,"models/shadertest/predator")}
  155. if (HMat == 10){holoMaterial(1,"phoenix_storms/chrome")}
  156. if (HMat == 11){holoMaterial(1,"models/props_combine/tprings_globe")}
  157. if (HMat == 12){holoMaterial(1,"models/props_c17/fisheyelens")}
  158.  
  159. if (Reset == 1) {
  160. Model = 0
  161. HSize = 0
  162. HRot = 0
  163. HCol = 0
  164. HMat = 0
  165. HRotSpeed = 0
  166. X = 0
  167. Y = 0
  168. Z = 0
  169. holoModel(1,"cube")
  170. holoMaterial(1,"")
  171. holoColor(1,vec(255,255,255))
  172. holoAng(1,ang(0,0,0))
  173. holoScale(1,vec(1,1,1))
  174. }
  175. } #<---------END---------------|
  176. if(ON & Negate == 1){ #<--------BEGIN2
  177. interval(25)
  178. if (~Reset | Reset == 1) {
  179. holoModel(1,"cube")
  180. holoMaterial(1,"")
  181. holoColor(1,vec(255,255,255))
  182. holoAng(1,ang(0,0,0))
  183. holoScale(1,vec(1,1,1))
  184. }
  185. ### Size Change Negative################################################################
  186.  
  187. ### X ##################################################################################
  188. if (~XP & XP) {
  189. X += (XP - XM)
  190. }
  191. if (~XM & XM) {
  192. X -= (XM - XP)
  193. }
  194. X = clamp(X,-15,15)
  195. ### Y ##################################################################################
  196. if (~YP & YP) {
  197. Y += (YP - YM)
  198. }
  199. if (~YM & YM) {
  200. Y -= (YM - YP)
  201. }
  202. Y = clamp(Y,-15,15)
  203. ### Z ###################################################################################
  204. if (~ZP & ZP) {
  205. Z += (ZP - ZM)
  206. }
  207. if (~ZM & ZM) {
  208. Z -= (ZM - ZP)
  209. }
  210. Z = clamp(Z,-15,15)
  211.  
  212. if (~HSizePlus & HSizePlus) {
  213. HSize += (HSizePlus - HSizeMinus)
  214. }
  215. if (~HSizeMinus & HSizeMinus){
  216. HSize -= (HSizeMinus - HSizePlus)
  217. }
  218. HSize = clamp(HSize,0,15)
  219. holoScale(1,vec(-X,-Y,-Z) + (HSize / 1.5))
  220. ### Rotation ############################################################################
  221. if (~HRotPlus & HRotPlus) {
  222. HRot += (HRotPlus - HRotMinus)
  223. }
  224. if ( ~HRotMinus & HRotMinus){
  225. HRot -= (HRotMinus - HRotPlus)
  226. }
  227. HRot = clamp(HRot,0,7)
  228. if (HRot == 0){holoAng(1,ang(N*2,P*2,P*2) )}
  229. if (HRot == 1){holoAng(1,ang(P*3,P*3,N*3) )}
  230. if (HRot == 2){holoAng(1,ang(N*4,N*4,P*4) )}
  231. if (HRot == 3){holoAng(1,ang(N*5,N*5,N*5) )}
  232. if (HRot == 4){holoAng(1,ang(P*6,P*6,P*6) )}
  233. if (HRot == 5){holoAng(1,ang(P*6.5,N*6.5,P*6.5) )}
  234. if (HRot == 6){holoAng(1,ang(N*7,P*7,N*7) )}
  235. if (HRot == 7){holoAng(1,ang(P*7.5,N*7.5,N*7.5) )}
  236.  
  237. ###### Color ##############################################################################
  238. if (~HColP & HColP) {
  239. HCol += (HColP - HColM)
  240. }
  241. if ( ~HColM & HColM){
  242. HCol -= (HColM - HColP)
  243. }
  244. HCol = clamp(HCol,0,7)
  245. if (HCol == 0) {holoColor(1,vec(0,0,0))}
  246. if (HCol == 1) {holoColor(1,vec(0,255,0))}
  247. if (HCol == 2) {holoColor(1,vec(255,0,0))}
  248. if (HCol == 3) {holoColor(1,vec(0,0,255))}
  249. if (HCol == 4) {holoColor(1,vec(255,0,255))}
  250. if (HCol == 5) {holoColor(1,vec(255,255,255))}
  251. if (HCol == 6) {holoColor(1,vec(255,255,0))}
  252. if (HCol == 7) {holoColor(1,vec(200,0,180))}
  253. ### Material ###############################################################################
  254. if (~HMatP & HMatP) {
  255. HMat += (HMatP - HMatM)
  256. }
  257. if (~HMatM & HMatM) {
  258. HMat -= (HMatM - HMatP)
  259. }
  260. HMat = clamp(HMat,0,12)
  261. if (HMat == 0){holoMaterial(1,"models/props_lab/warp_sheet")}
  262. if (HMat == 1){holoMaterial(1,"models/props_combine/health_charger_glass")}
  263. if (HMat == 2){holoMaterial(1,"models/props_combine/portalball001_sheet")}
  264. if (HMat == 3){holoMaterial(1,"models/props/cs_office/clouds")}
  265. if (HMat == 4){holoMaterial(1,"models/props_combine/com_shield001a")}
  266. if (HMat == 5){holoMaterial(1,"models/shadertest/shader3")}
  267. if (HMat == 6){holoMaterial(1,"models/shadertest/shader4")}
  268. if (HMat == 7){holoMaterial(1,"phoenix_storms/pack2/train_floor")}
  269. if (HMat == 8){holoMaterial(1,"phoenix_storms/Indenttiles2")}
  270. if (HMat == 9){holoMaterial(1,"models/shadertest/predator")}
  271. if (HMat == 10){holoMaterial(1,"phoenix_storms/chrome")}
  272. if (HMat == 11){holoMaterial(1,"models/props_combine/tprings_globe")}
  273. if (HMat == 12){holoMaterial(1,"models/props_c17/fisheyelens")}
  274.  
  275. ### Model ###################################################################################
  276. if (~Next & Next) {
  277. Model += (Next - Prev)
  278. }
  279. if (~Prev & Prev) {
  280. Model -= (Prev - Next )
  281. }
  282.  
  283. Model = clamp(Model,0,13)
  284. if (Model == 0){holoModel(1,"cube")}
  285. if (Model == 1){holoModel(1,"sphere")}
  286. if (Model == 2){holoModel(1,"sphere2")}
  287. if (Model == 3){holoModel(1,"sphere3")}
  288. if (Model == 4){holoModel(1,"cone")}
  289. if (Model == 5){holoModel(1,"icosphere")}
  290. if (Model == 6){holoModel(1,"icosphere2")}
  291. if (Model == 8){holoModel(1,"icosphere3")}
  292. if (Model == 9){holoModel(1,"prism")}
  293. if (Model == 10){holoModel(1,"pyramid")}
  294. if (Model == 11){holoModel(1,"torus")}
  295. if (Model == 12){holoModel(1,"torus2")}
  296. if (Model == 13){holoModel(1,"torus3")}
  297.  
  298. if (Reset == 1) {
  299. Model = 0
  300. HSize = 0
  301. HRot = 0
  302. HCol = 0
  303. HMat = 0
  304. HRotSpeed = 0
  305. X = 0
  306. Y = 0
  307. Z = 0
  308. holoModel(1,"cube")
  309. holoMaterial(1,"")
  310. holoColor(1,vec(255,255,255))
  311. holoAng(1,ang(0,0,0))
  312. holoScale(1,vec(1,1,1))
  313. }
  314. }#<--------END2
Add Comment
Please, Sign In to add comment