Cheesecaked

Plastic Bottle Reconstructor model thing

Mar 9th, 2023
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.09 KB | None | 0 0
  1. @name Plastic Bottle Reconstructor model
  2. @persist X
  3. @inputs EGP:wirelink Start
  4.  
  5. interval(30)
  6.  
  7. if(first()){
  8. entity():setMaterial("models/wireframe")
  9.  
  10. #runOnTick(1)
  11.  
  12. X = 0
  13.  
  14. # Base
  15.  
  16. holoCreate(1,entity():pos(),vec(18/12,6/12,1/24))
  17. holoParent(1,entity())
  18.  
  19. holoCreate(102,holoEntity(1):toWorld(vec(0.5,3-0.25,2+0.25)),vec(),holoEntity(1):toWorld(ang(0,90,0)))
  20. holoParent(102,1)
  21.  
  22. holoCreate(2,holoEntity(1):toWorld(vec(4.5,3-0.25,2+0.25)),vec(1/24,8/12,5/12),holoEntity(1):toWorld(ang(0,90,0)))
  23. holoAlpha(2,150)
  24. holoParent(2,102)
  25.  
  26. holoCreate(3,holoEntity(1):toWorld(vec(9-0.25,1.5,2+0.25)),vec(1/24,3/12,5/12),holoEntity(1):angles())
  27. holoAlpha(3,150)
  28. holoParent(3,2)
  29.  
  30. holoCreate(104,holoEntity(1):toWorld(vec(0.5,-3+0.25,2+0.25)),vec(),holoEntity(1):toWorld(ang(0,-90,0)))
  31. holoParent(104,1)
  32.  
  33. holoCreate(4,holoEntity(1):toWorld(vec(4.5,-3+0.25,2+0.25)),vec(1/24,8/12,5/12),holoEntity(1):toWorld(ang(0,-90,0)))
  34. holoAlpha(4,150)
  35. holoParent(4,104)
  36.  
  37. holoCreate(5,holoEntity(1):toWorld(vec(9-0.25,-1.5,2+0.25)),vec(1/24,3/12,5/12),holoEntity(1):angles())
  38. holoAlpha(5,150)
  39. holoParent(5,4)
  40.  
  41. holoCreate(6,holoEntity(1):toWorld(vec(0.25,0,2+0.25)),vec(1/24,6/12,5/12),holoEntity(1):angles())
  42. holoAlpha(6,150)
  43. holoParent(6,1)
  44.  
  45. holoCreate(7,holoEntity(1):toWorld(vec(-4.5,3-0.25,2+0.25)),vec(1/24,9/12,5/12),holoEntity(1):toWorld(ang(0,90,0)))
  46. holoAlpha(7,150)
  47. holoParent(7,1)
  48.  
  49. holoCreate(8,holoEntity(1):toWorld(vec(-4.5,-3+0.25,2+0.25)),vec(1/24,9/12,5/12),holoEntity(1):toWorld(ang(0,-90,0)))
  50. holoAlpha(8,150)
  51. holoParent(8,1)
  52.  
  53. # Pillars
  54.  
  55. holoCreate(9,holoEntity(1):toWorld(vec(5,0,4)),vec(4/12,4/12,7/12),holoEntity(1):toWorld(ang(0,0,90)),vec(255),"hq_cylinder")
  56. holoParent(9,1)
  57.  
  58. holoCreate(10,holoEntity(9):toWorld(vec(0,0,3.5)),vec(3/12,3/12,0.5/12),holoEntity(9):angles(),vec(255,50,50),"hqrcylinder")
  59. holoParent(10,9)
  60.  
  61. holoCreate(11,holoEntity(9):toWorld(vec(-5,5,3)),vec(11/12,1/12,1.5/12),holoEntity(1):toWorld(ang(-135,0,0)))
  62. holoParent(11,9)
  63.  
  64. holoCreate(12,holoEntity(11):toWorld(vec(5,0,0)),vec(3/12,3/12,1.5/12),holoEntity(9):angles(),vec(255),"hq_cylinder")
  65. holoParent(12,11)
  66.  
  67. holoCreate(13,holoEntity(9):toWorld(vec(0,0,-3.5)),vec(3/12,3/12,0.5/12),holoEntity(9):angles(),vec(255,50,50),"hqrcylinder")
  68. holoParent(13,9)
  69.  
  70. holoCreate(14,holoEntity(9):toWorld(vec(-5,5,-3)),vec(11/12,1/12,1.5/12),holoEntity(1):toWorld(ang(-135,0,0)))
  71. holoParent(14,9)
  72.  
  73. holoCreate(15,holoEntity(14):toWorld(vec(5,0,0)),vec(3/12,3/12,1.5/12),holoEntity(9):angles(),vec(255),"hq_cylinder")
  74. holoParent(15,14)
  75.  
  76. #rods
  77. holoCreate(16,holoEntity(9):toWorld(vec(0,4.375,-2)),vec(0.5/12,0.5/12,16.25/12),holoEntity(1):angles(),vec(150),"hq_cylinder")
  78. holoParent(16,9)
  79.  
  80. holoCreate(17,holoEntity(9):toWorld(vec(0,4.375,2)),vec(0.5/12,0.5/12,16.25/12),holoEntity(1):angles(),vec(150),"hq_cylinder")
  81. holoParent(17,9)
  82.  
  83. holoCreate(18,holoEntity(9):toWorld(vec(-5,0,-2)),vec(0.5/12,0.5/12,17/12),holoEntity(1):toWorld(ang(90,0,0)),vec(150),"hq_cylinder")
  84. holoParent(18,9)
  85.  
  86. holoCreate(19,holoEntity(9):toWorld(vec(-5,0,2)),vec(0.5/12,0.5/12,17/12),holoEntity(1):toWorld(ang(90,0,0)),vec(150),"hq_cylinder")
  87. holoParent(19,9)
  88.  
  89. # Layer2 Shell
  90.  
  91. holoCreate(120,holoEntity(1):toWorld(vec(9-2.25-0.5,2,8)),vec(),holoEntity(1):toWorld(ang(0,90,0)))
  92. holoParent(120,16)
  93.  
  94. holoCreate(20,holoEntity(1):toWorld(vec(9-2.25-0.5,3-0.25,8)),vec(1/24,4.5/12,7/12),holoEntity(1):toWorld(ang(0,90,0)))
  95. holoAlpha(20,150)
  96. holoParent(20,120)
  97.  
  98. holoCreate(21,holoEntity(1):toWorld(vec(9-0.25,1.5,8)),vec(1/24,3/12,7/12),holoEntity(1):angles())
  99. holoAlpha(21,150)
  100. holoParent(21,20)
  101.  
  102. holoCreate(122,holoEntity(1):toWorld(vec(9-2.25-0.5,-2,8)),vec(),holoEntity(1):toWorld(ang(0,-90,0)))
  103. holoParent(122,17)
  104.  
  105. holoCreate(22,holoEntity(1):toWorld(vec(9-2.25-0.5,-3+0.25,8)),vec(1/24,4.5/12,7/12),holoEntity(1):toWorld(ang(0,-90,0)))
  106. holoAlpha(22,150)
  107. holoParent(22,122)
  108.  
  109. holoCreate(23,holoEntity(1):toWorld(vec(9-0.25,-1.5,8)),vec(1/24,3/12,7/12),holoEntity(1):angles())
  110. holoAlpha(23,150)
  111. holoParent(23,22)
  112.  
  113. # Layer 3 Shell
  114.  
  115. holoCreate(124,holoEntity(1):toWorld(vec(9-2.25-0.5,2,15)),vec(),holoEntity(1):toWorld(ang(0,90,0)))
  116. holoParent(124,16)
  117.  
  118. holoCreate(24,holoEntity(1):toWorld(vec(9-2.25-0.5,3-0.25,15)),vec(1/24,4.5/12,7/12),holoEntity(1):toWorld(ang(0,90,0)))
  119. holoAlpha(24,150)
  120. holoParent(24,124)
  121.  
  122. holoCreate(25,holoEntity(1):toWorld(vec(9-0.25,1.5,15)),vec(1/24,3/12,7/12),holoEntity(1):angles())
  123. holoAlpha(25,150)
  124. holoParent(25,24)
  125.  
  126. holoCreate(126,holoEntity(1):toWorld(vec(9-2.25-0.5,-2,15)),vec(),holoEntity(1):toWorld(ang(0,-90,0)))
  127. holoParent(126,17)
  128.  
  129. holoCreate(26,holoEntity(1):toWorld(vec(9-2.25-0.5,-3+0.25,15)),vec(1/24,4.5/12,7/12),holoEntity(1):toWorld(ang(0,-90,0)))
  130. holoAlpha(26,150)
  131. holoParent(26,126)
  132.  
  133. holoCreate(27,holoEntity(1):toWorld(vec(9-0.25,-1.5,15)),vec(1/24,3/12,7/12),holoEntity(1):angles())
  134. holoAlpha(27,150)
  135. holoParent(27,26)
  136.  
  137. # Middle comp
  138.  
  139. holoCreate(28,holoEntity(1):toWorld(vec(5,2,11.5)),vec(0.65/12,0.65/12,4/12),holoEntity(1):angles(),vec(255),"hq_tube")
  140. holoParent(28,1)
  141.  
  142. holoCreate(29,holoEntity(1):toWorld(vec(5,-2,11.5)),vec(0.65/12,0.65/12,4/12),holoEntity(1):angles(),vec(255),"hq_tube")
  143. holoParent(29,1)
  144.  
  145. holoCreate(30,holoEntity(1):toWorld(vec(5.35,0,11.5)),vec(1/48,5/12,4/12),holoEntity(1):angles(),vec(255),"hq_rcube")
  146. holoParent(30,1)
  147.  
  148. holoCreate(31,holoEntity(1):toWorld(vec(6,2.25,11.5)),vec(1/24,2/12,4/12),holoEntity(1):toWorld(ang(0,90,0)),vec(255),"hq_rcube")
  149. holoParent(31,30)
  150.  
  151. holoCreate(32,holoEntity(1):toWorld(vec(6,-2.25,11.5)),vec(1/24,2/12,4/12),holoEntity(1):toWorld(ang(0,-90,0)),vec(255),"hq_rcube")
  152. holoParent(32,30)
  153.  
  154. holoCreate(33,holoEntity(1):toWorld(vec(6,1.75,11.5)),vec(1/12,1/12,2/12),holoEntity(1):toWorld(ang(90,0,0)),vec(255),"hqrcylinder")
  155. holoParent(33,31)
  156.  
  157. holoCreate(34,holoEntity(1):toWorld(vec(6,-1.75,11.5)),vec(1/12,1/12,2/12),holoEntity(1):toWorld(ang(90,0,0)),vec(255),"hqrcylinder")
  158. holoParent(34,32)
  159.  
  160. holoCreate(35,holoEntity(1):toWorld(vec(6.25,0,11.5)),vec(1/24,1/24,1/12),holoEntity(1):angles(),vec(150))
  161. holoParent(35,30)
  162.  
  163. holoCreate(36,holoEntity(1):toWorld(vec(6.25,0,11.35)),vec(1/72,1/72,3/12),holoEntity(1):toWorld(ang(0,0,90)),vec(150),"hq_cylinder")
  164. holoParent(36,30)
  165.  
  166. holoCreate(37,holoEntity(1):toWorld(vec(6.25,0,11.65)),vec(1/72,1/72,3/12),holoEntity(1):toWorld(ang(0,0,90)),vec(150),"hq_cylinder")
  167. holoParent(37,30)
  168.  
  169. holoCreate(38,holoEntity(35):toWorld(vec(0,0,0.5)),vec(0.5/12),holoEntity(1):toWorld(ang(180,0,0)),vec(180),"hq_cone")
  170. holoParent(38,30)
  171.  
  172. # Lower comp
  173.  
  174. holoCreate(39,holoEntity(1):toWorld(vec(5,2,7.5)),vec(0.65/12,0.65/12,2/12),holoEntity(1):angles(),vec(255),"hq_tube")
  175. holoParent(39,1)
  176.  
  177. holoCreate(40,holoEntity(1):toWorld(vec(5,-2,7.5)),vec(0.65/12,0.65/12,2/12),holoEntity(1):angles(),vec(255),"hq_tube")
  178. holoParent(40,1)
  179.  
  180. holoCreate(41,holoEntity(1):toWorld(vec(6,2.25,7.5)),vec(1/24,2/12,2/12),holoEntity(1):toWorld(ang(0,90,0)),vec(255),"hq_rcube")
  181. holoParent(41,1)
  182.  
  183. holoCreate(42,holoEntity(1):toWorld(vec(6,-2.25,7.5)),vec(1/24,2/12,2/12),holoEntity(1):toWorld(ang(0,90,0)),vec(255),"hq_rcube")
  184. holoParent(42,1)
  185.  
  186. holoCreate(43,holoEntity(1):toWorld(vec(6,1.75,7.5)),vec(1/12,1/12,1/24),holoEntity(1):toWorld(ang(0,0,90)),vec(255),"hqrcylinder")
  187. holoParent(43,1)
  188.  
  189. holoCreate(44,holoEntity(1):toWorld(vec(6,-1.75,7.5)),vec(1/12,1/12,1/24),holoEntity(1):toWorld(ang(0,0,90)),vec(255),"hqrcylinder")
  190. holoParent(44,1)
  191.  
  192. holoCreate(45,holoEntity(1):toWorld(vec(6,0,7.5)),vec(0.65/12,0.65/12,3.5/12),holoEntity(1):toWorld(ang(0,0,90)),vec(180),"hqrcylinder")
  193. holoParent(45,1)
  194.  
  195. # Upper comp
  196.  
  197. holoCreate(46,holoEntity(1):toWorld(vec(5,2,15.5)),vec(0.65/12,0.65/12,2/12),holoEntity(1):angles(),vec(255),"hq_tube")
  198. holoParent(46,1)
  199.  
  200. holoCreate(47,holoEntity(1):toWorld(vec(5,-2,15.5)),vec(0.65/12,0.65/12,2/12),holoEntity(1):angles(),vec(255),"hq_tube")
  201. holoParent(47,1)
  202.  
  203. holoCreate(48,holoEntity(1):toWorld(vec(6,2.25,15.5)),vec(1/24,2/12,2/12),holoEntity(1):toWorld(ang(0,90,0)),vec(255),"hq_rcube")
  204. holoParent(48,1)
  205.  
  206. holoCreate(49,holoEntity(1):toWorld(vec(6,-2.25,15.5)),vec(1/24,2/12,2/12),holoEntity(1):toWorld(ang(0,90,0)),vec(255),"hq_rcube")
  207. holoParent(49,1)
  208.  
  209. holoCreate(50,holoEntity(1):toWorld(vec(6,1.75,15.5)),vec(1/12,1/12,1/24),holoEntity(1):toWorld(ang(0,0,90)),vec(255),"hqrcylinder")
  210. holoParent(50,1)
  211.  
  212. holoCreate(51,holoEntity(1):toWorld(vec(6,-1.75,15.5)),vec(1/12,1/12,1/24),holoEntity(1):toWorld(ang(0,0,90)),vec(255),"hqrcylinder")
  213. holoParent(51,1)
  214.  
  215. holoCreate(52,holoEntity(1):toWorld(vec(6,0,15.5)),vec(0.65/12,0.65/12,3.5/12),holoEntity(1):toWorld(ang(0,0,90)),vec(180),"hqrcylinder")
  216. holoParent(52,1)
  217.  
  218. # Top comp
  219.  
  220. holoCreate(53,holoEntity(1):toWorld(vec(5,2,16.5)),vec(1/12,1/12,1/48),holoEntity(1):toWorld(ang(0,90,0)),vec(255),"hq_rcube")
  221. holoParent(53,1)
  222.  
  223. holoCreate(54,holoEntity(1):toWorld(vec(5,-2,16.5)),vec(1/12,1/12,1/48),holoEntity(1):toWorld(ang(0,-90,0)),vec(255),"hq_rcube")
  224. holoParent(54,1)
  225.  
  226. holoCreate(55,holoEntity(1):toWorld(vec(5,2.5,17.5)),vec(1/48,1/12,2/12),holoEntity(1):toWorld(ang(0,90,0)),vec(255),"hq_rcube")
  227. holoParent(55,1)
  228.  
  229. holoCreate(56,holoEntity(1):toWorld(vec(5,-2.5,17.5)),vec(1/48,1/12,2/12),holoEntity(1):toWorld(ang(0,-90,0)),vec(255),"hq_rcube")
  230. holoParent(56,1)
  231.  
  232. holoCreate(57,holoEntity(1):toWorld(vec(5,0,17.5)),vec(0.5/12,0.5/12,5/12),holoEntity(1):toWorld(ang(0,0,90)),vec(255),"hq_cylinder")
  233. holoParent(57,1)
  234.  
  235. holoCreate(58,holoEntity(1):toWorld(vec(4.5,0,17.5)),vec(0.25/12,5.25/12,2/12),holoEntity(1):angles(),vec(255))
  236. holoParent(58,1)
  237.  
  238. # Moving Raw
  239.  
  240. holoCreate(59,holoEntity(1):toWorld(vec(5,15,19.5)),vec(0.65/12,0.65/12,2/12),holoEntity(1):toWorld(ang(0,0,90)),vec(220),"hq_tube")
  241.  
  242. holoCreate(60,holoEntity(59):toWorld(vec(0,0,1-0.25)),vec(1.3/12,1.3/12,0.5/12),holoEntity(1):toWorld(ang(0,0,90)),vec(220),"hq_tube_thick")
  243. holoParent(60,59)
  244.  
  245. holoCreate(61,holoEntity(59):toWorld(vec(0,0,-1+0.25)),vec(1.3/12,1.3/12,0.5/12),holoEntity(1):toWorld(ang(0,0,90)),vec(220),"hq_tube_thick")
  246. holoParent(61,59)
  247.  
  248. holoCreate(62,holoEntity(59):pos(),vec(0.725/12,0.725/12,1/12),holoEntity(1):toWorld(ang(0,0,90)),vec(255,100,100),"hq_tube_thin")
  249. holoParent(62,59)
  250. holoAlpha(62,0)
  251.  
  252. # Moving Finish
  253.  
  254. holoCreate(63,holoEntity(12):toWorld(vec(0,14,-2.25-0.75)),vec(4/12,4/12,3.5/12),holoEntity(12):angles(),vec(220),"hq_cylinder")
  255.  
  256. holoCreate(64,holoEntity(63):toWorld(vec(0,0,1.75+0.25)),vec(7/12,7/12,0.5/12),holoEntity(63):angles(),vec(255,50,50),"hq_cylinder")
  257. holoParent(64,63)
  258.  
  259. holoCreate(65,holoEntity(63):toWorld(vec(0,0,-1.75-0.25)),vec(7/12,7/12,0.5/12),holoEntity(63):angles(),vec(255,50,50),"hq_cylinder")
  260. holoParent(65,63)
  261.  
  262. holoCreate(66,holoEntity(63):pos(),vec(4.45/12,4.45/12,3.5/12),holoEntity(12):angles(),vec(255,100,100),"hq_tube_thin")
  263. holoParent(66,63)
  264. holoAlpha(66,0)
  265.  
  266. # Bottle Prop
  267.  
  268. holoCreate(67,holoEntity(1):toWorld(vec(0,20,3.7)),vec(1),holoEntity(1):angles())
  269. holoModel(67,"models/props/cs_office/water_bottle.mdl")
  270. #holoAlpha(67,230)
  271. holoClip(67,holoEntity(67):toWorld(vec(0,0,-4)),holoEntity(1):toWorld(vec(0,0,1))-holoEntity(1):pos(),1)
  272. holoClipEnabled(67,1)
  273.  
  274. # Cap
  275.  
  276. holoCreate(168,holoEntity(1):toWorld(vec(9-5+0.25,0,18.5+0.25)),vec(),holoEntity(1):angles())
  277. holoParent(168,1)
  278.  
  279. holoCreate(68,holoEntity(1):toWorld(vec(9-2.5,0,18.5+0.25)),vec(5/12,6/12,1/24),holoEntity(1):angles())
  280. holoAlpha(68,150)
  281. holoParent(68,168)
  282.  
  283. # Knife
  284.  
  285. holoCreate(69,holoEntity(1):toWorld(vec(0,40,-0.25+0.75)),vec(0.75/12,0.75/12,16/12),holoEntity(1):toWorld(ang(0,0,90)),vec(150),"hq_cylinder") #nice
  286. #holoCreate(69,holoEntity(67):toWorld(vec(0,0,-3)),vec(0.75/12,0.75/12,16/12),holoEntity(1):toWorld(ang()),vec(150),"hq_cylinder") #nice
  287.  
  288. holoCreate(70,holoEntity(69):toWorld(vec(0,0,-1)),vec(1.5/12,1.5/12,2/12),holoEntity(69):angles(),vec(255),"hq_tube_thick")
  289. holoAlpha(70,150)
  290. holoParent(70,69)
  291.  
  292. holoCreate(71,holoEntity(70):toWorld(vec(1.375,0,0)),vec(2/12,1/12,2/12),holoEntity(69):angles(),vec(255),"hq_rcube")
  293. holoAlpha(71,150)
  294. holoParent(71,70)
  295.  
  296. holoCreate(72,holoEntity(70):toWorld(vec(1.25,0,0.5)),vec(0.25/12,1.1/12,1/12),holoEntity(69):angles(),vec(10),"hq_rcube")
  297. holoParent(72,70)
  298.  
  299. # Process Props
  300.  
  301. timer("create1",1000)
  302.  
  303. #print(holoCanCreate())
  304.  
  305. # Flip open
  306. ###
  307. #holoAng(16,holoEntity(1):toWorld(ang(0,90,0)))
  308. #holoAng(17,holoEntity(1):toWorld(ang(0,-90,0)))
  309. #holoAng(168,holoEntity(1):toWorld(ang(-90,0,0)))
  310. ###
  311. }
  312. elseif(changed(first())){
  313. for(H = 59,62){
  314. #holoAlpha(H,0)
  315. }
  316.  
  317. for(H = 63,66){
  318. holoAlpha(H,0)
  319. }
  320. }
  321. else{
  322. #holoAng(16,holoEntity(16):toWorld(ang(0,5,0)))
  323. #holoAng(17,holoEntity(17):toWorld(ang(0,-5,0)))
  324.  
  325. #holoAng(16,holoEntity(1):toWorld(ang(0,45 + sin(curtime()*100)*45,0)))
  326. #holoAng(17,holoEntity(1):toWorld(ang(0,-45 - sin(curtime()*100)*45,0)))
  327.  
  328. Timestamp = array(1,51, 330,337, 357,366, 386,446, 566,586, 606,621, 641,645, 725,750,
  329. 770,790, 815,840, 860,885, 905,930, 950,975, 995,1020
  330. )#c1 ori 660, +40
  331.  
  332. if(Start == 1){
  333. X += 1
  334. }
  335.  
  336. if(X > Timestamp[1,number] & X <= Timestamp[2,number]){
  337. EGP:egpAlpha(1,X*2)
  338. }
  339. elseif(X > Timestamp[3,number] & X <= Timestamp[4,number]){
  340. holoPos(67,holoEntity(67):toWorld(vec(0,0,2)))
  341. holoClip(67,holoEntity(67):toWorld(vec(0,0,-4)),holoEntity(1):toWorld(vec(0,0,1))-holoEntity(1):pos(),1)
  342. }
  343. elseif(X > Timestamp[5,number] & X <= Timestamp[6,number]){
  344. holoPos(69,holoEntity(69):pos() + holoEntity(1):toWorld(vec(0,-20/9,14.2/9)) - holoEntity(1):pos())
  345. holoAng(69,holoEntity(69):toWorld(ang(0,0,-10)))
  346. }
  347. elseif(X > Timestamp[7,number] & X <= Timestamp[8,number]){
  348. holoPos(70,holoEntity(70):pos() + holoEntity(1):toWorld(vec(0,0,0.105)) - holoEntity(1):pos())
  349. holoAng(70,holoEntity(70):toWorld(ang(0,6,0)))
  350.  
  351. # -4 to 2.3
  352. holoClip(67,holoEntity(67):toWorld(vec(0,0,-4+0.105*(X-Timestamp[7,number]))),holoEntity(1):toWorld(vec(0,0,1))-holoEntity(1):pos(),1)
  353.  
  354. holoAlpha(62,holoEntity(62):getAlpha()+(255/60))
  355. }
  356. elseif(X > Timestamp[9,number] & X <= Timestamp[10,number]){
  357. holoAng(16,holoEntity(1):toWorld(ang(0,90*((X-Timestamp[9,number])/20),0)))
  358. holoAng(17,holoEntity(1):toWorld(ang(0,-90*((X-Timestamp[9,number])/20),0)))
  359. holoAng(168,holoEntity(1):toWorld(ang(-90*((X-Timestamp[9,number])/20),0,0)))
  360. }
  361. elseif(X > Timestamp[11,number] & X <= Timestamp[12,number]){
  362. holoPos(59,holoEntity(59):toWorld(vec(0,0,1)))
  363. }
  364. elseif(X > Timestamp[13,number] & X <= Timestamp[14,number]){
  365. holoPos(59,holoEntity(59):toWorld(vec(0,-0.5,0)))
  366. }
  367. elseif(X > Timestamp[15,number] & X <= Timestamp[16,number]){
  368. holoAlpha(63,holoEntity(63):getAlpha()+11)
  369. for(H = 64,65){
  370. holoAlpha(H,holoEntity(H):getAlpha()+10)
  371. }
  372. }
  373. elseif(X > Timestamp[17,number] & X <= Timestamp[18,number]){
  374. holoPos(63,holoEntity(63):toWorld(vec(0,-14/20,0)))
  375. }
  376. elseif(X > Timestamp[19,number] & X <= Timestamp[20,number]){
  377. holoAlpha(73,holoEntity(73):getAlpha()+11)
  378. }
  379. elseif(X > Timestamp[21,number] & X <= Timestamp[22,number]){
  380. holoAlpha(74,holoEntity(74):getAlpha()+11)
  381. }
  382. elseif(X > Timestamp[23,number] & X <= Timestamp[24,number]){
  383. holoAlpha(75,holoEntity(75):getAlpha()+11)
  384. }
  385. elseif(X > Timestamp[25,number] & X <= Timestamp[26,number]){
  386. holoAlpha(76,holoEntity(76):getAlpha()+11)
  387. }
  388. elseif(X > Timestamp[27,number] & X <= Timestamp[28,number]){
  389. holoAlpha(66,holoEntity(66):getAlpha()+11)
  390. }
  391.  
  392. if(changed(->EGP)){
  393. EGP:egpClear()
  394. }
  395.  
  396. if(EGP){
  397. if(X == 1){
  398. EGP:egpBox(1,egpScrSize(owner())/2,vec2(egpScrW(owner())*0.7,egpScrH(owner())*0.2))
  399. }
  400. if(X == 50){
  401. EGP:egpText(2,"Plastic Bottle Reconstructor",EGP:egpPos(1)+vec2(-350,-60))
  402. EGP:egpSize(2,60)
  403. EGP:egpColor(2,vec(25))
  404. EGP:egpAlpha(2,180)
  405. }
  406. if(X == 90){
  407. EGP:egpText(3,"Polyformer and 3D-printer",EGP:egpPos(1)+vec2(-200,20))
  408. EGP:egpSize(3,36)
  409. EGP:egpColor(3,vec(25))
  410. EGP:egpAlpha(3,180)
  411. }
  412. if(X == 250){
  413. for(E = 1,3){
  414. EGP:egpRemove(E)
  415. }
  416. }
  417.  
  418. if(X == 290){
  419. EGP:egpBox(11,vec2(egpScrW(owner())/2,egpScrH(owner())*0.1),vec2(egpScrW(owner())*0.8,egpScrH(owner())*0.15))
  420. EGP:egpAlpha(11,100)
  421.  
  422. EGP:egpText(12,"How to use: First, the user cuts the plastic bottle into strips",EGP:egpPos(11)+vec2(-445,-42))
  423. EGP:egpSize(12,36)
  424. EGP:egpColor(12,vec(25))
  425. EGP:egpAlpha(12,180)
  426.  
  427. EGP:egpText(13,"using the knife in the Polyformer building set",EGP:egpPos(11)+vec2(-330,8))
  428. EGP:egpSize(13,36)
  429. EGP:egpColor(13,vec(25))
  430. EGP:egpAlpha(13,180)
  431. }
  432. if(X == 486){
  433. for(E = 11,13){
  434. EGP:egpRemove(E)
  435. }
  436. }
  437.  
  438. if(X == 526){
  439. EGP:egpBox(21,vec2(egpScrW(owner())/2,egpScrH(owner())*0.1),vec2(egpScrW(owner())*0.8,egpScrH(owner())*0.15))
  440. EGP:egpAlpha(21,100)
  441.  
  442. EGP:egpText(22,"Then, the user opens the Polyformer by flipping its cap up",EGP:egpPos(21)+vec2(-445,-42))
  443. EGP:egpSize(22,36)
  444. EGP:egpColor(22,vec(25))
  445. EGP:egpAlpha(22,180)
  446.  
  447. EGP:egpText(23,"and insert the plastic strips in",EGP:egpPos(21)+vec2(-240,8))
  448. EGP:egpSize(23,36)
  449. EGP:egpColor(23,vec(25))
  450. EGP:egpAlpha(23,180)
  451. }
  452. if(X == 645){
  453. for(E = 21,23){
  454. EGP:egpRemove(E)
  455. }
  456. }
  457.  
  458. if(X == 685){
  459. EGP:egpBox(31,vec2(egpScrW(owner())/2,egpScrH(owner())*0.1),vec2(egpScrW(owner())*0.8,egpScrH(owner())*0.15))
  460. EGP:egpAlpha(31,100)
  461.  
  462. EGP:egpText(32,"Insert the 3D-printing cartridge......",EGP:egpPos(31)+vec2(-250,-17))
  463. EGP:egpSize(32,36)
  464. EGP:egpColor(32,vec(25))
  465. EGP:egpAlpha(32,180)
  466. }
  467. if(X == 735){
  468. for(E = 31,32){
  469. EGP:egpRemove(E)
  470. }
  471. }
  472.  
  473. if(X == 775){
  474. EGP:egpBox(41,vec2(egpScrW(owner())/2,egpScrH(owner())*0.1),vec2(egpScrW(owner())*0.8,egpScrH(owner())*0.15))
  475. EGP:egpAlpha(41,100)
  476.  
  477. EGP:egpText(42,"And 3D-printing material is produced",EGP:egpPos(41)+vec2(-270,-42))
  478. EGP:egpSize(42,36)
  479. EGP:egpColor(42,vec(25))
  480. EGP:egpAlpha(42,180)
  481.  
  482. EGP:egpText(43,"for the printer part of PBR",EGP:egpPos(41)+vec2(-190,8))
  483. EGP:egpSize(43,36)
  484. EGP:egpColor(43,vec(25))
  485. EGP:egpAlpha(43,180)
  486. }
  487. if(X == 1060){
  488. for(E = 41,43){
  489. EGP:egpRemove(E)
  490. }
  491. }
  492.  
  493. if(X == 1100){
  494. EGP:egpBox(51,vec2(egpScrW(owner())/2,egpScrH(owner())*0.1),vec2(egpScrW(owner())*0.8,egpScrH(owner())*0.15))
  495. EGP:egpAlpha(51,100)
  496.  
  497. EGP:egpText(52,"Thanks for watching",EGP:egpPos(51)+vec2(-155,-17))
  498. EGP:egpSize(52,36)
  499. EGP:egpColor(52,vec(25))
  500. EGP:egpAlpha(52,180)
  501. }
  502. if(X == 1300){
  503. for(E = 41,43){
  504. EGP:egpRemove(E)
  505. }
  506. }
  507. }
  508. }
  509.  
  510. if(clk("create1")){
  511. holoCreate(73,(holoEntity(57):pos() + holoEntity(52):pos())/2 + holoEntity(1):forward()*0.4,vec((holoEntity(57):pos():distance(holoEntity(52):pos()))/12,0.5/12,0.125/12),(holoEntity(52):pos() - holoEntity(57):pos()):toAngle(),vec(255,100,100))
  512. holoParent(73,1)
  513.  
  514. holoCreate(74,(holoEntity(73):toWorld(vec((holoEntity(57):pos():distance(holoEntity(52):pos()))/2,0,0)) + holoEntity(38):pos())/2,vec((holoEntity(73):toWorld(vec((holoEntity(57):pos():distance(holoEntity(52):pos()))/2,0,0)):distance(holoEntity(38):pos()))/12,0.25/12,0.125/12),(holoEntity(38):pos() - holoEntity(73):toWorld(vec((holoEntity(57):pos():distance(holoEntity(52):pos()))/2,0,0))):toAngle(),vec(255,100,100))
  515. holoParent(74,1)
  516.  
  517. #35 - 45, bad idea to not use variables
  518. End74 = holoEntity(35):toWorld(vec(0,0,-0.5))
  519. holoCreate(75,(End74 + holoEntity(45):pos() + holoEntity(1):forward()*0.4)/2,vec(0.125/12,0.25/12,End74:distance(holoEntity(45):pos() + holoEntity(1):forward()*0.4)/12),(holoEntity(45):pos() + holoEntity(1):forward()*0.4 - End74):toAngle()+ang(90,0,0),vec(255,100,100),"hq_cylinder")
  520.  
  521. End75 = holoEntity(45):toWorld(vec(0,-0.25,0))
  522. Start76 = holoEntity(12):toWorld(vec(0,-2,-2.25-0.75))
  523. holoCreate(76,(End75 + Start76)/2,vec(0.125/12,0.25/12,End75:distance(Start76)/12),(Start76 - End75):toAngle() + ang(90,0,0),vec(255,100,100),"hq_cylinder")
  524.  
  525. for(H = 73,76){
  526. holoAlpha(H,0)
  527. }
  528. }
  529.  
  530.  
Advertisement
Add Comment
Please, Sign In to add comment