Advertisement
Guest User

Untitled

a guest
Mar 26th, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.94 KB | None | 0 0
  1. @name Exosuit
  2. @inputs
  3. @outputs
  4. @persist FUrg [FOL FNL FOR FNR FPL FPR RFVel LFVel]:vector Len FootRangerLen [RD LR RR RunRangerR RunRangerL]:ranger RangerLen FI FW FP L1 L2 L3 P:entity E:entity
  5. @persist Total FirstSegmentAdjustAngle Energy Radius Time StepHeight Sprinting Flying Charge_Delay Spc I TotalHolograms
  6. @model models/hunter/blocks/cube075x075x075.mdl
  7. if(first())
  8. {
  9. runOnTick(1)
  10.  
  11. E = entity()
  12. E:setMass(5000)
  13. # E:setAlpha(0)
  14.  
  15. I = 9
  16. TotalHolograms = 122
  17.  
  18. Radius = 40
  19. StepHeight = 10+5
  20.  
  21. TotalHolograms = 114
  22.  
  23. findByClass("prop_vehicle_prisoner_pod")
  24. findInSphere(E:pos(),200)
  25. P = findClosest(E:pos())
  26. P:propFreeze(1)
  27. P:setPos(E:toWorld(vec(0,0,0)))
  28. P:setAng(E:toWorld(ang(0,0,0)))
  29. P:setMass(1)
  30.  
  31. L1 = 30
  32. L2 = 50
  33. L3 = 55
  34. Total = L1 + L2 + L3
  35. FirstSegmentAdjustAngle = 0
  36.  
  37. function number cosine (One, Two, Three){
  38. return acos( (Three^2 + Two^2 - One^2) / (2*Two*Three) )
  39. }
  40. function kinemize ([Ent Hip Knee Ankle]:entity, FootPos:vector) {
  41. #-Hip
  42. Bearing = -bearing(Hip:pos(), Ent:angles(), FootPos)
  43. Angle = Ent:toLocalAxis(FootPos - Hip:pos()):toAngle():setRoll(Bearing)
  44. Offset = Total - abs(min(Hip:pos():distance(FootPos), Total))
  45. Quat = quat(Angle) * qRotation(vec(0, -Offset + FirstSegmentAdjustAngle, 0))
  46. holoAng(holoIndex(Hip), Ent:toWorld(slerp(quat(Hip), Quat, 1):toAngle()))
  47. #-Second
  48. Distance = min(Knee:pos():distance(FootPos), L2+L3)
  49. Axis = Hip:toLocalAxis(Knee:pos() - FootPos)
  50. Atan = atan(-Axis:z(), Axis:x()) + cosine(L3, L2, Distance) + 90
  51. holoAng(holoIndex(Knee), Hip:toWorld(ang(Atan,0,0)))
  52. #-Third
  53. holoAng(holoIndex(Ankle), Knee:toWorld(ang(cosine(Distance, L2, L3), 0, 0)))
  54. }
  55. holoCreate(1, E:toWorld(vec(0,30,0)))
  56. holoCreate(2, holoEntity(1):toWorld(vec(L1, 0, 0)))
  57. holoCreate(3, holoEntity(2):toWorld(vec(0, 0, -L2)))
  58. holoCreate(4, holoEntity(3):toWorld(vec(0, 0, L3)))
  59.  
  60. holoParent(1, E)
  61. holoParent(2, 1)
  62. holoParent(3, 2)
  63. holoParent(4, 3)
  64.  
  65. holoCreate(5, E:toWorld(vec(0,-30,0)))
  66. holoCreate(6, holoEntity(5):toWorld(vec(L1, 0, 0)))
  67. holoCreate(7, holoEntity(6):toWorld(vec(0, 0, -L2)))
  68. holoCreate(8, holoEntity(7):toWorld(vec(0, 0, L3)))
  69.  
  70. holoParent(5, E)
  71. holoParent(6, 5)
  72. holoParent(7, 6)
  73. holoParent(8, 7)
  74.  
  75. holoCreate(1000)
  76. holoCreate(2000)
  77. holoAlpha(1000,0)
  78. holoAlpha(2000,0)
  79.  
  80. for(I = 1,8){
  81. holoModel(I,"hq_sphere")
  82. holoScale(I,vec(1.5,1.5,1.5))
  83. holoAlpha(I,0)
  84. }
  85.  
  86. function vector bezierC(Src:vector,End:vector,CurvePoint:vector,Progress:number)
  87. {
  88. return mix(mix(Src,CurvePoint,Progress),mix(CurvePoint,End,Progress),Progress)
  89. }
  90.  
  91.  
  92. soundPitch("footstepL",80)
  93. soundPitch("footstepR",80)
  94.  
  95. timer("parent",100)
  96. }
  97.  
  98. while(perf() & holoCanCreate() & I < TotalHolograms){
  99.  
  100. #LeftLeg
  101. holoCreate(I,holoEntity(1):toWorld(vec(0,9,0)),vec(0.15,0.15,0.15),holoEntity(1):toWorld(ang(100,180,90)),vec(115,115,115))
  102. holoParent(I,1)
  103. holoModel(I,"models/props_wasteland/laundry_washer001a.mdl")
  104. holoMaterial(I,"sprops/textures/gear_metal")
  105. I++
  106. holoCreate(I,holoEntity(1):toWorld(vec(9.25,6,-8)),vec(1,0.5,1),holoEntity(1):toWorld(ang(270,180,0)),vec(115,115,115))
  107. holoParent(I,1)
  108. holoModel(I,"prism")
  109. holoMaterial(I,"sprops/textures/gear_metal")
  110. I++
  111. holoCreate(I,holoEntity(1):toWorld(vec(-5.76,6,-8)),vec(1,0.5,1.5),holoEntity(1):toWorld(ang(90,0,0)),vec(115,115,115))
  112. holoParent(I,1)
  113. holoModel(I,"hq_cube")
  114. holoMaterial(I,"sprops/textures/gear_metal")
  115. I++
  116. holoCreate(I,holoEntity(1):toWorld(vec(-20.75,6,-8)),vec(1,0.5,1),holoEntity(1):toWorld(ang(270,0,0)),vec(115,115,115))
  117. holoParent(I,1)
  118. holoModel(I,"prism")
  119. holoMaterial(I,"sprops/textures/gear_metal")
  120. I++
  121. holoCreate(I,holoEntity(1):toWorld(vec(-20,6,0)),vec(1.5,0.5,1.5),holoEntity(1):toWorld(ang(90,0,0)),vec(115,115,115))
  122. holoParent(I,1)
  123. holoModel(I,"hq_cube")
  124. holoMaterial(I,"sprops/textures/gear_metal")
  125. I++
  126. holoCreate(I,holoEntity(1):toWorld(vec(-17.03,6,0)),vec(1.5,1,1.5),holoEntity(1):toWorld(ang(0,0,0)),vec(115,115,115))
  127. holoParent(I,1)
  128. holoModel(I,"hexagon")
  129. holoMaterial(I,"sprops/textures/gear_metal")
  130. I++
  131. holoCreate(I,holoEntity(1):toWorld(vec(-5,6,0)),vec(1.5,1,2),holoEntity(1):toWorld(ang(90,0,0)),vec(115,115,115))
  132. holoParent(I,1)
  133. holoModel(I,"hq_cube")
  134. holoMaterial(I,"sprops/textures/gear_metal")
  135. I++
  136. #Thigh
  137. holoCreate(I,holoEntity(1):toWorld(vec(9,6,0)),vec(1.4,0.9,2),holoEntity(1):toWorld(ang(90,0,0)),vec(115,115,115))
  138. holoParent(I,1)
  139. holoModel(I,"hq_cube")
  140. holoMaterial(I,"sprops/textures/gear_metal")
  141. I++
  142. holoCreate(I,holoEntity(1):toWorld(vec(21.6,6,0)),vec(1.35,0.8,1.5),holoEntity(1):toWorld(ang(90,0,0)),vec(115,115,115))
  143. holoParent(I,1)
  144. holoModel(I,"hq_cube")
  145. holoMaterial(I,"sprops/textures/gear_metal")
  146. I++
  147. #Knee
  148. holoCreate(I,holoEntity(2):toWorld(vec(0,6,0)),vec(1.35,1.35,0.8),holoEntity(2):toWorld(ang(0,0,90)),vec(115,115,115))
  149. holoParent(I,2)
  150. holoModel(I,"hq_cylinder")
  151. holoMaterial(I,"sprops/textures/gear_metal")
  152. I++
  153. #Shin
  154. holoCreate(I,holoEntity(2):toWorld(vec(0,6,-23)),vec(0.5,0.4,1.3),holoEntity(2):toWorld(ang(180,180,0)),vec(115,115,115))
  155. holoParent(I,2)
  156. holoModel(I,"models/props_junk/TrashBin01a.mdl")
  157. holoMaterial(I,"sprops/textures/gear_metal")
  158. I++
  159. holoCreate(I,holoEntity(2):toWorld(vec(0,6,-37)),vec(1.2,1.2,1.5),holoEntity(2):toWorld(ang(90,0,0)),vec(115,115,115))
  160. holoParent(I,2)
  161. holoModel(I,"models/gibs/scanner_gib01.mdl")
  162. holoMaterial(I,"sprops/textures/gear_metal")
  163. I++
  164. holoCreate(I,holoEntity(2):toWorld(vec(0,6,-37)),vec(1.2,1.2,1.5),holoEntity(2):toWorld(ang(90,90,0)),vec(115,115,115))
  165. holoParent(I,2)
  166. holoModel(I,"models/gibs/scanner_gib01.mdl")
  167. holoMaterial(I,"sprops/textures/gear_metal")
  168. I++
  169. holoCreate(I,holoEntity(2):toWorld(vec(0,6,-10)),vec(1.2,1.2,1.5),holoEntity(2):toWorld(ang(270,0,0)),vec(115,115,115))
  170. holoParent(I,2)
  171. holoModel(I,"models/gibs/scanner_gib01.mdl")
  172. holoMaterial(I,"sprops/textures/gear_metal")
  173. I++
  174. holoCreate(I,holoEntity(2):toWorld(vec(1,6,0)),vec(1,0.5,1),holoEntity(2):toWorld(ang(0,0,180)),vec(115,115,115))
  175. holoParent(I,2)
  176. holoModel(I,"models/gibs/scanner_gib01.mdl")
  177. holoMaterial(I,"sprops/textures/gear_metal")
  178. I++
  179. holoCreate(I,holoEntity(2):toWorld(vec(11,6,1)),vec(0.5,0.5,0.5),holoEntity(2):toWorld(ang(0,0,90)),vec(115,115,115))
  180. holoParent(I,2)
  181. holoModel(I,"hq_cylinder")
  182. holoMaterial(I,"sprops/textures/gear_metal")
  183. I++
  184. holoCreate(I,holoEntity(2):toWorld(vec(9,6,-15)),vec(0.3,0.3,3),holoEntity(2):toWorld(ang(7,0,0)),vec(130,130,130))
  185. holoParent(I,2)
  186. holoModel(I,"hq_cylinder")
  187. holoMaterial(I,"models/shiny")
  188. I++
  189. holoCreate(I,holoEntity(2):toWorld(vec(6.5,6,-35)),vec(0.5,0.5,1.5),holoEntity(2):toWorld(ang(7,0,0)),vec(115,115,115))
  190. holoParent(I,2)
  191. holoModel(I,"hq_cylinder")
  192. holoMaterial(I,"sprops/textures/gear_metal")
  193. I++
  194. holoCreate(I,holoEntity(2):toWorld(vec(0,6,10)),vec(2.5,2.5,2.5),holoEntity(2):toWorld(ang(-90,45,180)),vec(115,115,115))
  195. holoParent(I,2)
  196. holoModel(I,"models/gibs/scanner_gib02.mdl")
  197. holoMaterial(I,"sprops/textures/gear_metal")
  198. I++
  199. #Ankle
  200. holoCreate(I,holoEntity(3):toWorld(vec(0,6,0)),vec(1.35,1.35,1),holoEntity(3):toWorld(ang(0,0,90)),vec(115,115,115))
  201. holoParent(I,3)
  202. holoModel(I,"hq_cylinder")
  203. holoMaterial(I,"sprops/textures/gear_metal")
  204. I++
  205. #Other Shin
  206. holoCreate(I,holoEntity(3):toWorld(vec(-3,6,15)),vec(0.6,1,1.5),holoEntity(3):toWorld(ang(0,0,0)),vec(115,115,115))
  207. holoParent(I,3)
  208. holoModel(I,"hq_cube")
  209. holoMaterial(I,"sprops/textures/gear_metal")
  210. I++
  211. holoCreate(I,holoEntity(3):toWorld(vec(-2.4,6,25)),vec(0.5,0.9,2),holoEntity(3):toWorld(ang(0,0,0)),vec(115,115,115))
  212. holoParent(I,3)
  213. holoModel(I,"hq_cube")
  214. holoMaterial(I,"sprops/textures/gear_metal")
  215. I++
  216. holoCreate(I,holoEntity(3):toWorld(vec(-1.8,6,35)),vec(0.4,0.6,2),holoEntity(3):toWorld(ang(0,0,0)),vec(115,115,115))
  217. holoParent(I,3)
  218. holoModel(I,"hq_cube")
  219. holoMaterial(I,"sprops/textures/gear_metal")
  220. I++
  221. holoCreate(I,holoEntity(3):toWorld(vec(3,6,15)),vec(0.4,0.4,2),holoEntity(3):toWorld(ang(0,0,0)),vec(115,115,115))
  222. holoParent(I,3)
  223. holoModel(I,"hq_cylinder")
  224. holoMaterial(I,"sprops/textures/gear_metal")
  225. I++
  226. holoCreate(I,holoEntity(3):toWorld(vec(3,6,35)),vec(0.3,0.3,2),holoEntity(3):toWorld(ang(0,0,0)),vec(130,130,130))
  227. holoParent(I,3)
  228. holoModel(I,"hq_cylinder")
  229. holoMaterial(I,"models/shiny")
  230. I++
  231. holoCreate(I,holoEntity(3):toWorld(vec(3,10.5,15)),vec(0.3,0.3,1),holoEntity(3):toWorld(ang(180,0,0)),vec(115,115,115))
  232. holoParent(I,3)
  233. holoModel(I,"models/props_junk/PropaneCanister001a.mdl")
  234. holoMaterial(I,"sprops/textures/gear_metal")
  235. I++
  236. holoCreate(I,holoEntity(3):toWorld(vec(3,1.5,15)),vec(0.3,0.3,1),holoEntity(3):toWorld(ang(180,0,0)),vec(115,115,115))
  237. holoParent(I,3)
  238. holoModel(I,"models/props_junk/PropaneCanister001a.mdl")
  239. holoMaterial(I,"sprops/textures/gear_metal")
  240. I++
  241. #Foot
  242. holoCreate(I)
  243. holoPos(I,holoEntity(4):toWorld(vec(0,6,-5)))
  244. holoScale(I,vec(1,1,0.8))
  245. holoColor(I,vec(115,115,115))
  246. holoParent(I,4)
  247. holoModel(I,"hq_cylinder")
  248. holoMaterial(I,"sprops/textures/gear_metal")
  249. I++
  250. holoCreate(I,holoEntity(36):toWorld(vec(0,0,0)),vec(0.5,0.5,0.9),holoEntity(36):toWorld(ang(0,0,0)),vec(115,115,115))
  251. holoParent(I,36)
  252. holoModel(I,"hq_cylinder")
  253. holoMaterial(I,"sprops/textures/gear_metal")
  254. I++
  255. holoCreate(I,holoEntity(36):toWorld(vec(0,0,0)),vec(2,0.6,1.5),holoEntity(36):toWorld(ang(0,0,270)),vec(115,115,115))
  256. holoParent(I,36)
  257. holoModel(I,"prism")
  258. holoMaterial(I,"sprops/textures/gear_metal")
  259. I++
  260. holoCreate(I,holoEntity(36):toWorld(vec(6,-4.4,-5.17)),vec(0.35,0.2,0.5),holoEntity(36):toWorld(ang(0,0,0)),vec(115,115,115))
  261. holoParent(I,36)
  262. holoModel(I,"models/props_phx/construct/metal_plate1_tri.mdl")
  263. holoMaterial(I,"sprops/textures/gear_metal")
  264. I++
  265. holoCreate(I,holoEntity(36):toWorld(vec(6,-4.4,3.45)),vec(0.35,0.2,0.5),holoEntity(36):toWorld(ang(0,0,0)),vec(115,115,115))
  266. holoParent(I,36)
  267. holoModel(I,"models/props_phx/construct/metal_plate1_tri.mdl")
  268. holoMaterial(I,"sprops/textures/gear_metal")
  269. I++
  270. holoCreate(I,holoEntity(36):toWorld(vec(-5,-4.4,3.8)),vec(0.45,0.2,0.5),holoEntity(36):toWorld(ang(180,0,0)),vec(115,115,115))
  271. holoParent(I,36)
  272. holoModel(I,"models/props_phx/construct/metal_plate1_tri.mdl")
  273. holoMaterial(I,"sprops/textures/gear_metal")
  274. I++
  275. holoCreate(I,holoEntity(36):toWorld(vec(-5,-4.4,-2)),vec(0.45,0.2,0.5),holoEntity(36):toWorld(ang(180,0,0)),vec(115,115,115))
  276. holoParent(I,36)
  277. holoModel(I,"models/props_phx/construct/metal_plate1_tri.mdl")
  278. holoMaterial(I,"sprops/textures/gear_metal")
  279. I++
  280. holoCreate(I,holoEntity(36):toWorld(vec(16,-4.4,-4.3)),vec(0.5,0.5,0.8),holoEntity(36):toWorld(ang(0,0,90)),vec(115,115,115))
  281. holoParent(I,36)
  282. holoModel(I,"hq_cylinder")
  283. holoMaterial(I,"sprops/textures/gear_metal")
  284. I++
  285. holoCreate(I,holoEntity(36):toWorld(vec(16,-4.4,4.3)),vec(0.5,0.5,0.8),holoEntity(36):toWorld(ang(0,0,90)),vec(115,115,115))
  286. holoParent(I,36)
  287. holoModel(I,"hq_cylinder")
  288. holoMaterial(I,"sprops/textures/gear_metal")
  289. I++
  290. holoCreate(I,holoEntity(36):toWorld(vec(-15.5,-4.4,0)),vec(0.5,0.5,0.8),holoEntity(36):toWorld(ang(0,0,90)),vec(115,115,115))
  291. holoParent(I,36)
  292. holoModel(I,"hq_cylinder")
  293. holoMaterial(I,"sprops/textures/gear_metal")
  294. I++
  295. holoCreate(I,holoEntity(36):toWorld(vec(16,0.15,-4.3)),vec(0.5,0.5,0.5),holoEntity(36):toWorld(ang(90,90,0)),vec(115,115,115))
  296. holoParent(I,36)
  297. holoModel(I,"hq_dome")
  298. holoMaterial(I,"sprops/textures/gear_metal")
  299. I++
  300. holoCreate(I,holoEntity(36):toWorld(vec(16,0.15,4.3)),vec(0.5,0.5,0.5),holoEntity(36):toWorld(ang(90,90,0)),vec(115,115,115))
  301. holoParent(I,36)
  302. holoModel(I,"hq_dome")
  303. holoMaterial(I,"sprops/textures/gear_metal")
  304. I++
  305. holoCreate(I,holoEntity(36):toWorld(vec(-15.5,0.15,0)),vec(0.5,0.5,0.5),holoEntity(36):toWorld(ang(90,90,0)),vec(115,115,115))
  306. holoParent(I,36)
  307. holoModel(I,"hq_dome")
  308. holoMaterial(I,"sprops/textures/gear_metal")
  309. I++
  310. holoCreate(I,holoEntity(36):toWorld(vec(16,-4.4,-4.3)),vec(0.55,0.55,0.5),holoEntity(36):toWorld(ang(0,0,90)),vec(115,115,115))
  311. holoParent(I,36)
  312. holoModel(I,"hq_cylinder")
  313. holoMaterial(I,"sprops/textures/gear_metal")
  314. I++
  315. holoCreate(I,holoEntity(36):toWorld(vec(16,-4.4,4.3)),vec(0.55,0.55,0.5),holoEntity(36):toWorld(ang(0,0,90)),vec(115,115,115))
  316. holoParent(I,36)
  317. holoModel(I,"hq_cylinder")
  318. holoMaterial(I,"sprops/textures/gear_metal")
  319. I++
  320. holoCreate(I,holoEntity(36):toWorld(vec(-15.5,-4.4,0)),vec(0.55,0.55,0.5),holoEntity(36):toWorld(ang(0,0,90)),vec(115,115,115))
  321. holoParent(I,36)
  322. holoModel(I,"hq_cylinder")
  323. holoMaterial(I,"sprops/textures/gear_metal")
  324. I++
  325. holoCreate(I,holoEntity(36):toWorld(vec(16,-0.5,-4.3)),vec(0.51,0.51,0.1),holoEntity(36):toWorld(ang(0,0,90)),vec(175,130,70))
  326. holoParent(I,36)
  327. holoModel(I,"hq_cylinder")
  328. holoMaterial(I,"models/debug/debugwhite")
  329. I++
  330. holoCreate(I,holoEntity(36):toWorld(vec(16,-0.5,4.3)),vec(0.51,0.51,0.1),holoEntity(36):toWorld(ang(0,0,90)),vec(175,130,70))
  331. holoParent(I,36)
  332. holoModel(I,"hq_cylinder")
  333. holoMaterial(I,"models/debug/debugwhite")
  334. I++
  335. holoCreate(I,holoEntity(36):toWorld(vec(-15.5,-0.5,0)),vec(0.51,0.51,0.1),holoEntity(36):toWorld(ang(0,0,90)),vec(175,130,70))
  336. holoParent(I,36)
  337. holoModel(I,"hq_cylinder")
  338. holoMaterial(I,"models/debug/debugwhite")
  339. I++
  340. holoCreate(I,holoEntity(36):toWorld(vec(16,-7,-4.3)),vec(0.5,0.5,1.3),holoEntity(36):toWorld(ang(0,0,90)),vec(115,115,115))
  341. holoParent(I,36)
  342. holoModel(I,"hq_cone")
  343. holoMaterial(I,"sprops/textures/gear_metal")
  344. I++
  345. holoCreate(I,holoEntity(36):toWorld(vec(16,-7,4.3)),vec(0.5,0.5,1.3),holoEntity(36):toWorld(ang(0,0,90)),vec(115,115,115))
  346. holoParent(I,36)
  347. holoModel(I,"hq_cone")
  348. holoMaterial(I,"sprops/textures/gear_metal")
  349. I++
  350. holoCreate(I,holoEntity(36):toWorld(vec(-15.5,-7,0)),vec(0.5,0.5,1.3),holoEntity(36):toWorld(ang(0,0,90)),vec(115,115,115))
  351. holoParent(I,36)
  352. holoModel(I,"hq_cone")
  353. holoMaterial(I,"sprops/textures/gear_metal")
  354. I++
  355.  
  356. #RIGHT LEG
  357. holoCreate(I,holoEntity(1 + 4):toWorld(vec(0,-9,0)),vec(0.15,0.15,0.15),holoEntity(1 + 4):toWorld(ang(100,180,270)),vec(115,115,115))
  358. holoParent(I,1 + 4)
  359. holoModel(I,"models/props_wasteland/laundry_washer001a.mdl")
  360. holoMaterial(I,"sprops/textures/gear_metal")
  361. I++
  362. holoCreate(I,holoEntity(1 + 4):toWorld(vec(9.25,-6,-8)),vec(1,0.5,1),holoEntity(1 + 4):toWorld(ang(270,180,0)),vec(115,115,115))
  363. holoParent(I,1 + 4)
  364. holoModel(I,"prism")
  365. holoMaterial(10 + 57,"sprops/textures/gear_metal")
  366. I++
  367. holoCreate(I,holoEntity(1 + 4):toWorld(vec(-5.76,-6,-8)),vec(1,0.5,1.5),holoEntity(1 + 4):toWorld(ang(90,0,0)),vec(115,115,115))
  368. holoParent(I,1 + 4)
  369. holoModel(I,"hq_cube")
  370. holoMaterial(I,"sprops/textures/gear_metal")
  371. I++
  372. holoCreate(I,holoEntity(1 + 4):toWorld(vec(-20.75,-6,-8)),vec(1,0.5,1),holoEntity(1 + 4):toWorld(ang(270,0,0)),vec(115,115,115))
  373. holoParent(I,1 + 4)
  374. holoModel(I,"prism")
  375. holoMaterial(I,"sprops/textures/gear_metal")
  376. I++
  377. holoCreate(I,holoEntity(1 + 4):toWorld(vec(-20,-6,0)),vec(1.5,0.5,1.5),holoEntity(1 + 4):toWorld(ang(90,0,0)),vec(115,115,115))
  378. holoParent(I,1 + 4)
  379. holoModel(I,"hq_cube")
  380. holoMaterial(13 + 57,"sprops/textures/gear_metal")
  381. I++
  382. holoCreate(I,holoEntity(1 + 4):toWorld(vec(-17.03,-6,0)),vec(1.5,1,1.5),holoEntity(1 + 4):toWorld(ang(0,0,0)),vec(115,115,115))
  383. holoParent(I,1 + 4)
  384. holoModel(I,"hexagon")
  385. holoMaterial(I,"sprops/textures/gear_metal")
  386. I++
  387. holoCreate(I,holoEntity(1 + 4):toWorld(vec(-5,-6,0)),vec(1.5,1,2),holoEntity(1 + 4):toWorld(ang(90,0,0)),vec(115,115,115))
  388. holoParent(I,1 + 4)
  389. holoModel(I,"hq_cube")
  390. holoMaterial(I,"sprops/textures/gear_metal")
  391. I++
  392. #Thigh
  393. holoCreate(I,holoEntity(1 + 4):toWorld(vec(9,-6,0)),vec(1.4,0.9,2),holoEntity(1 + 4):toWorld(ang(90,0,0)),vec(115,115,115))
  394. holoParent(I,1 + 4)
  395. holoModel(I,"hq_cube")
  396. holoMaterial(I,"sprops/textures/gear_metal")
  397. I++
  398. holoCreate(I,holoEntity(1 + 4):toWorld(vec(21.6,-6,0)),vec(1.35,0.8,1.5),holoEntity(1 + 4):toWorld(ang(90,0,0)),vec(115,115,115))
  399. holoParent(I,1 + 4)
  400. holoModel(I,"hq_cube")
  401. holoMaterial(I,"sprops/textures/gear_metal")
  402. I++
  403. #Knee
  404. holoCreate(I,holoEntity(2 + 4):toWorld(vec(0,-6,0)),vec(1.35,1.35,0.8),holoEntity(2 + 4):toWorld(ang(0,0,90)),vec(115,115,115))
  405. holoParent(I,2 + 4)
  406. holoModel(I,"hq_cylinder")
  407. holoMaterial(I,"sprops/textures/gear_metal")
  408. I++
  409. #Shin
  410. holoCreate(I,holoEntity(2 + 4):toWorld(vec(0,-6,-23)),vec(0.5,0.4,1.3),holoEntity(2 + 4):toWorld(ang(180,180,0)),vec(115,115,115))
  411. holoParent(I,2 + 4)
  412. holoModel(I,"models/props_junk/TrashBin01a.mdl")
  413. holoMaterial(I,"sprops/textures/gear_metal")
  414. I++
  415. holoCreate(I,holoEntity(2 + 4):toWorld(vec(0,-6,-37)),vec(1.2,1.2,1.5),holoEntity(2 + 4):toWorld(ang(90,0,0)),vec(115,115,115))
  416. holoParent(I,2 + 4)
  417. holoModel(I,"models/gibs/scanner_gib01.mdl")
  418. holoMaterial(I,"sprops/textures/gear_metal")
  419. I++
  420. holoCreate(I,holoEntity(2 + 4):toWorld(vec(0,-6,-37)),vec(1.2,1.2,1.5),holoEntity(2 + 4):toWorld(ang(90,90,0)),vec(115,115,115))
  421. holoParent(I,2 + 4)
  422. holoModel(I,"models/gibs/scanner_gib01.mdl")
  423. holoMaterial(I,"sprops/textures/gear_metal")
  424. I++
  425. holoCreate(I,holoEntity(2 + 4):toWorld(vec(0,-6,-10)),vec(1.2,1.2,1.5),holoEntity(2 + 4):toWorld(ang(270,0,0)),vec(115,115,115))
  426. holoParent(I,2 + 4)
  427. holoModel(I,"models/gibs/scanner_gib01.mdl")
  428. holoMaterial(22 + 57,"sprops/textures/gear_metal")
  429. I++
  430. holoCreate(I,holoEntity(2 + 4):toWorld(vec(1,-6,0)),vec(1,0.5,1),holoEntity(2 + 4):toWorld(ang(0,0,180)),vec(115,115,115))
  431. holoParent(I,2 + 4)
  432. holoModel(I,"models/gibs/scanner_gib01.mdl")
  433. holoMaterial(I,"sprops/textures/gear_metal")
  434. I++
  435. holoCreate(I,holoEntity(2 + 4):toWorld(vec(11,-6,1)),vec(0.5,0.5,0.5),holoEntity(2 + 4):toWorld(ang(0,0,90)),vec(115,115,115))
  436. holoParent(I,2 + 4)
  437. holoModel(I,"hq_cylinder")
  438. holoMaterial(24 + 57,"sprops/textures/gear_metal")
  439. I++
  440. holoCreate(I,holoEntity(2 + 4):toWorld(vec(9,-6,-15)),vec(0.3,0.3,3),holoEntity(2 + 4):toWorld(ang(7,0,0)),vec(130,130,130))
  441. holoParent(I,2 + 4)
  442. holoModel(I,"hq_cylinder")
  443. holoMaterial(I,"models/shiny")
  444. I++
  445. holoCreate(I,holoEntity(2 + 4):toWorld(vec(6.5,-6,-35)),vec(0.5,0.5,1.5),holoEntity(2 + 4):toWorld(ang(7,0,0)),vec(115,115,115))
  446. holoParent(I,2 + 4)
  447. holoModel(I,"hq_cylinder")
  448. holoMaterial(I,"sprops/textures/gear_metal")
  449. I++
  450. holoCreate(I,holoEntity(2 + 4):toWorld(vec(0,-6,10)),vec(2.5,2.5,2.5),holoEntity(2 + 4):toWorld(ang(-90,45,180)),vec(115,115,115))
  451. holoParent(I,2 + 4)
  452. holoModel(I,"models/gibs/scanner_gib02.mdl")
  453. holoMaterial(I,"sprops/textures/gear_metal")
  454. I++
  455. #Ankle
  456. holoCreate(I,holoEntity(3 + 4):toWorld(vec(0,-6,0)),vec(1.35,1.35,1),holoEntity(3 + 4):toWorld(ang(0,0,90)),vec(115,115,115))
  457. holoParent(I,3 + 4)
  458. holoModel(I,"hq_cylinder")
  459. holoMaterial(I,"sprops/textures/gear_metal")
  460. I++
  461. #Other Shin
  462. holoCreate(I,holoEntity(3 + 4):toWorld(vec(-3,-6,15)),vec(0.6,1,1.5),holoEntity(3 + 4):toWorld(ang(0,0,0)),vec(115,115,115))
  463. holoParent(I,3 + 4)
  464. holoModel(I,"hq_cube")
  465. holoMaterial(I,"sprops/textures/gear_metal")
  466. I++
  467. holoCreate(I,holoEntity(3 + 4):toWorld(vec(-2.4,-6,25)),vec(0.5,0.9,2),holoEntity(3 + 4):toWorld(ang(0,0,0)),vec(115,115,115))
  468. holoParent(I,3 + 4)
  469. holoModel(I,"hq_cube")
  470. holoMaterial(I,"sprops/textures/gear_metal")
  471. I++
  472. holoCreate(I,holoEntity(3 + 4):toWorld(vec(-1.8,-6,35)),vec(0.4,0.6,2),holoEntity(3 + 4):toWorld(ang(0,0,0)),vec(115,115,115))
  473. holoParent(I,3 + 4)
  474. holoModel(I,"hq_cube")
  475. holoMaterial(I,"sprops/textures/gear_metal")
  476. I++
  477. holoCreate(I,holoEntity(3 + 4):toWorld(vec(3,-6,15)),vec(0.4,0.4,2),holoEntity(3 + 4):toWorld(ang(0,0,0)),vec(115,115,115))
  478. holoParent(I,3 + 4)
  479. holoModel(I,"hq_cylinder")
  480. holoMaterial(I,"sprops/textures/gear_metal")
  481. I++
  482. holoCreate(I,holoEntity(3 + 4):toWorld(vec(3,-6,35)),vec(0.3,0.3,2),holoEntity(3 + 4):toWorld(ang(0,0,0)),vec(130,130,130))
  483. holoParent(I,3 + 4)
  484. holoModel(I,"hq_cylinder")
  485. holoMaterial(I,"models/shiny")
  486. I++
  487. holoCreate(I,holoEntity(3 + 4):toWorld(vec(3,-10.5,15)),vec(0.3,0.3,1),holoEntity(3 + 4):toWorld(ang(180,0,0)),vec(115,115,115))
  488. holoParent(I,3 + 4)
  489. holoModel(I,"models/props_junk/PropaneCanister001a.mdl")
  490. holoMaterial(I,"sprops/textures/gear_metal")
  491. I++
  492. holoCreate(I,holoEntity(3 + 4):toWorld(vec(3,-1.5,15)),vec(0.3,0.3,1),holoEntity(3 + 4):toWorld(ang(180,0,0)),vec(115,115,115))
  493. holoParent(I,3 + 4)
  494. holoModel(I,"models/props_junk/PropaneCanister001a.mdl")
  495. holoMaterial(I,"sprops/textures/gear_metal")
  496. I++
  497. #Foot
  498. holoCreate(I)
  499. holoPos(I,holoEntity(4 + 4):toWorld(vec(0,-6,-5)))
  500. holoScale(I,vec(1,1,0.8))
  501. holoColor(I,vec(115,115,115))
  502. holoParent(I,4)
  503. holoModel(I,"hq_cylinder")
  504. holoMaterial(I,"sprops/textures/gear_metal")
  505. I++
  506. holoCreate(I,holoEntity(36 + 57):toWorld(vec(0,0,0)),vec(0.5,0.5,0.9),holoEntity(36 + 57):toWorld(ang(0,0,0)),vec(115,115,115))
  507. holoParent(I,36 + 57)
  508. holoModel(I,"hq_cylinder")
  509. holoMaterial(I,"sprops/textures/gear_metal")
  510. I++
  511. holoCreate(I,holoEntity(36 + 57):toWorld(vec(0,0,0)),vec(2,0.6,1.5),holoEntity(36 + 57):toWorld(ang(0,0,270)),vec(115,115,115))
  512. holoParent(I,36 + 57)
  513. holoModel(I,"prism")
  514. holoMaterial(I,"sprops/textures/gear_metal")
  515. I++
  516. holoCreate(I,holoEntity(36 + 57):toWorld(vec(6,-4.4,-5.17)),vec(0.35,0.2,0.5),holoEntity(36 + 57):toWorld(ang(0,0,0)),vec(115,115,115))
  517. holoParent(I,36 + 57)
  518. holoModel(I,"models/props_phx/construct/metal_plate1_tri.mdl")
  519. holoMaterial(I,"sprops/textures/gear_metal")
  520. I++
  521. holoCreate(I,holoEntity(36 + 57):toWorld(vec(6,-4.4,3.45)),vec(0.35,0.2,0.5),holoEntity(36 + 57):toWorld(ang(0,0,0)),vec(115,115,115))
  522. holoParent(I,36 + 57)
  523. holoModel(I,"models/props_phx/construct/metal_plate1_tri.mdl")
  524. holoMaterial(I,"sprops/textures/gear_metal")
  525. I++
  526. holoCreate(I,holoEntity(36 + 57):toWorld(vec(-5,-4.4,3.8)),vec(0.45,0.2,0.5),holoEntity(36 + 57):toWorld(ang(180,0,0)),vec(115,115,115))
  527. holoParent(I,36 + 57)
  528. holoModel(I,"models/props_phx/construct/metal_plate1_tri.mdl")
  529. holoMaterial(I,"sprops/textures/gear_metal")
  530. I++
  531. holoCreate(I,holoEntity(36 + 57):toWorld(vec(-5,-4.4,-2)),vec(0.45,0.2,0.5),holoEntity(36 + 57):toWorld(ang(180,0,0)),vec(115,115,115))
  532. holoParent(I,36 + 57)
  533. holoModel(I,"models/props_phx/construct/metal_plate1_tri.mdl")
  534. holoMaterial(I,"sprops/textures/gear_metal")
  535. I++
  536. holoCreate(I,holoEntity(36 + 57):toWorld(vec(16,-4.4,-4.3)),vec(0.5,0.5,0.8),holoEntity(36 + 57):toWorld(ang(0,0,90)),vec(115,115,115))
  537. holoParent(I,36 + 57)
  538. holoModel(I,"hq_cylinder")
  539. holoMaterial(I,"sprops/textures/gear_metal")
  540. I++
  541. holoCreate(I,holoEntity(36 + 57):toWorld(vec(16,-4.4,4.3)),vec(0.5,0.5,0.8),holoEntity(36 + 57):toWorld(ang(0,0,90)),vec(115,115,115))
  542. holoParent(I,36 + 57)
  543. holoModel(I,"hq_cylinder")
  544. holoMaterial(I,"sprops/textures/gear_metal")
  545. I++
  546. holoCreate(I,holoEntity(36 + 57):toWorld(vec(-15.5,-4.4,0)),vec(0.5,0.5,0.8),holoEntity(36 + 57):toWorld(ang(0,0,90)),vec(115,115,115))
  547. holoParent(I,36 + 57)
  548. holoModel(I,"hq_cylinder")
  549. holoMaterial(I,"sprops/textures/gear_metal")
  550. I++
  551. holoCreate(I,holoEntity(36 + 57):toWorld(vec(16,0.15,-4.3)),vec(0.5,0.5,0.5),holoEntity(36 + 57):toWorld(ang(90,90,0)),vec(115,115,115))
  552. holoParent(I,36 + 57)
  553. holoModel(I,"hq_dome")
  554. holoMaterial(I,"sprops/textures/gear_metal")
  555. I++
  556. holoCreate(I,holoEntity(36 + 57):toWorld(vec(16,0.15,4.3)),vec(0.5,0.5,0.5),holoEntity(36 + 57):toWorld(ang(90,90,0)),vec(115,115,115))
  557. holoParent(I,36 + 57)
  558. holoModel(I,"hq_dome")
  559. holoMaterial(I,"sprops/textures/gear_metal")
  560. I++
  561. holoCreate(I,holoEntity(36 + 57):toWorld(vec(-15.5,0.15,0)),vec(0.5,0.5,0.5),holoEntity(36 + 57):toWorld(ang(90,90,0)),vec(115,115,115))
  562. holoParent(I,36 + 57)
  563. holoModel(I,"hq_dome")
  564. holoMaterial(I,"sprops/textures/gear_metal")
  565. I++
  566. holoCreate(I,holoEntity(36 + 57):toWorld(vec(16,-4.4,-4.3)),vec(0.55,0.55,0.5),holoEntity(36 + 57):toWorld(ang(0,0,90)),vec(115,115,115))
  567. holoParent(I,36 + 57)
  568. holoModel(I,"hq_cylinder")
  569. holoMaterial(I,"sprops/textures/gear_metal")
  570. I++
  571. holoCreate(I,holoEntity(36 + 57):toWorld(vec(16,-4.4,4.3)),vec(0.55,0.55,0.5),holoEntity(36 + 57):toWorld(ang(0,0,90)),vec(115,115,115))
  572. holoParent(I,36 + 57)
  573. holoModel(I,"hq_cylinder")
  574. holoMaterial(I,"sprops/textures/gear_metal")
  575. I++
  576. holoCreate(I,holoEntity(36 + 57):toWorld(vec(-15.5,-4.4,0)),vec(0.55,0.55,0.5),holoEntity(36 + 57):toWorld(ang(0,0,90)),vec(115,115,115))
  577. holoParent(I,36 + 57)
  578. holoModel(I,"hq_cylinder")
  579. holoMaterial(I,"sprops/textures/gear_metal")
  580. I++
  581. holoCreate(I,holoEntity(36 + 57):toWorld(vec(16,-0.5,-4.3)),vec(0.51,0.51,0.1),holoEntity(36 + 57):toWorld(ang(0,0,90)),vec(175,130,70))
  582. holoParent(I,36 + 57)
  583. holoModel(I,"hq_cylinder")
  584. holoMaterial(I,"models/debug/debugwhite")
  585. I++
  586. holoCreate(I,holoEntity(36 + 57):toWorld(vec(16,-0.5,4.3)),vec(0.51,0.51,0.1),holoEntity(36 + 57):toWorld(ang(0,0,90)),vec(175,130,70))
  587. holoParent(I,36 + 57)
  588. holoModel(I,"hq_cylinder")
  589. holoMaterial(I,"models/debug/debugwhite")
  590. I++
  591. holoCreate(I,holoEntity(36 + 57):toWorld(vec(-15.5,-0.5,0)),vec(0.51,0.51,0.1),holoEntity(36 + 57):toWorld(ang(0,0,90)),vec(175,130,70))
  592. holoParent(I,36 + 57)
  593. holoModel(I,"hq_cylinder")
  594. holoMaterial(I,"models/debug/debugwhite")
  595. I++
  596. holoCreate(I,holoEntity(36 + 57):toWorld(vec(16,-7,-4.3)),vec(0.5,0.5,1.3),holoEntity(36 + 57):toWorld(ang(0,0,90)),vec(115,115,115))
  597. holoParent(I,36 + 57)
  598. holoModel(I,"hq_cone")
  599. holoMaterial(I,"sprops/textures/gear_metal")
  600. I++
  601. holoCreate(I,holoEntity(36 + 57):toWorld(vec(16,-7,4.3)),vec(0.5,0.5,1.3),holoEntity(36 + 57):toWorld(ang(0,0,90)),vec(115,115,115))
  602. holoParent(I,36 + 57)
  603. holoModel(I,"hq_cone")
  604. holoMaterial(I,"sprops/textures/gear_metal")
  605. I++
  606. holoCreate(I,holoEntity(36 + 57):toWorld(vec(-15.5,-7,0)),vec(0.5,0.5,1.3),holoEntity(36 + 57):toWorld(ang(0,0,90)),vec(115,115,115))
  607. holoParent(I,36 + 57)
  608. holoModel(I,"hq_cone")
  609. holoMaterial(I,"sprops/textures/gear_metal")
  610.  
  611.  
  612. if(I==TotalHolograms){
  613. runOnTick(0)
  614. interval(70)
  615. }
  616. }
  617.  
  618. if(clk("parent")){
  619.  
  620. P:parentTo(E)
  621. E:propFreeze(0)
  622. stoptimer("parent")
  623. }
  624.  
  625. kinemize(E, holoEntity(1), holoEntity(2), holoEntity(3), holoEntity(1000):toWorld(vec(0,0,5)))
  626. kinemize(E, holoEntity(5), holoEntity(6), holoEntity(7), holoEntity(2000):toWorld(vec(0,0,5)))
  627.  
  628. holoAng(36,ang(0,E:angles():yaw(),90))
  629. holoAng(36 + 57,ang(0,E:angles():yaw(),90))
  630.  
  631. holoPos(1000, RD:hit() ? FPL : (E:toWorld(vec(0.1, 30, -90)))-clamp(E:vel()/5,0,20))
  632. holoPos(2000, RD:hit() ? FPR : (E:toWorld(vec(0.1, -30, -90)))-clamp(E:vel()/5,0,20))
  633.  
  634. Dri = P:driver()
  635. Active = P:driver():isValid()
  636. if(Active)
  637. {
  638. W = Dri:keyForward()
  639. A = Dri:keyLeft()
  640. S = Dri:keyBack()
  641. D = Dri:keyRight()
  642. Spc = Dri:keyJump()
  643. Shift = Dri:keySprint()
  644. M1 = Dri:keyAttack1()
  645. M2 = Dri:keyAttack2()
  646. R = Dri:keyReload()
  647. Alt = Dri:keyWalk()
  648.  
  649. AimPos = rangerOffset(99999999, Dri:shootPos() + Dri:eye() * 50, Dri:eye())
  650. }
  651.  
  652. if(changed(Active)&!Active){M1 = 0, M2 = 0}
  653.  
  654. Sprinting = Shift & W & (Energy>=0.15) & RD:hit() & !Alt
  655. Flying = Spc & (Energy>=1) & !RD:hit()
  656.  
  657. rangerFilter(E)
  658. rangerFilter(P)
  659.  
  660. Len = 64*1.5
  661. RangerLen = 140+(30*Sprinting) - ((Spc & (Energy>=1))*40)
  662. FootRangerLen = (Len * 2) - 8
  663. RD = rangerOffset(RangerLen, E:pos(), vec(0, 0, -1))
  664.  
  665.  
  666. #APPLYING FORCE#
  667. #E:applyForce(((((E:up()*Spc*100 + E:forward()*(50+(Sprinting*150*RD:hit()))*(W-S)) - (E:right()*30*((A-D)*Alt)) - ((E:vel()/3)) + RD:pos() + vec(0,0,90+(20*Sprinting)
  668. #+sin(clamp(FP, 0, 1) * 180) * FUrg * 2))) - E:pos())*E:mass()*4*(RD:hit()|(Spc*Energy>0)))
  669.  
  670. #E:applyForce((((E:toWorldAxis(vec((W-S), (A-D)*Alt, Spc * (Energy>0) * 100):normalized()*150)+(RD:pos()+vec(0,0,90+(20*Sprinting)+sin(clamp(FP, 0, 1) * 180) * FUrg * 2) - E:pos())*vec(1,1,2)) - E:toWorldAxis(E:velL() * vec(1-(0.8*Sprinting), 1.6, 0.4)))*E:mass())*(RD:hit()|Flying))
  671. Movement = E:toWorldAxis(vec((W-S), (A-D)*Alt, 0):normalized()*150) + E:up()*150*(Spc * (Energy>=1))
  672. Height = (RD:pos()+vec(0,0,90+(20*Sprinting)+(sin((Time*2*Sprinting))*30)+sin(clamp(FP, 0, 1) * 180) * FUrg * 2) - E:pos()) * vec(1, 1, 3)
  673. Dampener = E:toWorldAxis(E:velL() * vec(1-(0.8*Sprinting)-(Flying*0.5), 1.6-((Alt&(A|D)&Flying)*0.7), 0.4))
  674.  
  675. E:applyForce((((Movement + Height) - Dampener)*E:mass() * (RD:hit() | Flying)))
  676.  
  677. E:applyAngForce(((angnorm((ang(0,E:angles():yaw()+((A-D)*!Alt*(RD:hit()|(Spc*Energy>0)))*30,cos(Time)*15*Sprinting)) - E:angles()) - E:angVel()/2)* E:mass()*2))
  678. #APPLYING FORCE#
  679.  
  680. LR = rangerOffset(RangerLen, E:toWorld(vec(0.1, 30, 0)), -E:up())
  681. RR = rangerOffset(RangerLen, E:toWorld(vec(0.1, -30, 0)), -E:up())
  682.  
  683. LFPos = holoEntity(1000):pos()
  684. RFPos = holoEntity(2000):pos()
  685.  
  686.  
  687. if(RD:hit())
  688. {
  689. if(Sprinting){
  690. Time+=E:vel():length()/18.7
  691. RunRangerL = rangerOffset(LR:distance()+5 - StepHeight + cos(Time)*StepHeight,E:toWorld(vec(30,30,0)),E:toWorld(ang(90 + sin(Time)*Radius, 0, 0)):forward())
  692. RunRangerR = rangerOffset(RR:distance()+5 - StepHeight - cos(Time)*StepHeight,E:toWorld(vec(30,-30,0)),E:toWorld(ang(90 - sin(Time)*Radius, 0, 0)):forward())
  693. FPL = RunRangerL:position()
  694. FPR = RunRangerR:position()
  695. } else {
  696.  
  697. if(FI)
  698. {
  699. #Left foot
  700. if(FW)
  701. {
  702. #Walking
  703. if(FP >= 0.6)
  704. {
  705. #Finished, reset it all
  706. holoEntity(4):soundPlay("footstepL", 0.6, "npc/dog/dog_servo5.wav")
  707. #holoEntity(4):soundPlay("footstepL", 0.6, "mvm/giant_pyro/giant_pyro_step_03.wav")
  708.  
  709. FPL = FNL
  710. FP = 0
  711. FW = 0
  712. FI = !FI
  713. }
  714. else
  715. {
  716. #Increment progress, do bezier curves and all
  717. FP += 0.05 * (FUrg / #[4]#8) + 0.15
  718. FPL = bezierC(FOL, FNL, mix(FOL, FNL, 0.5) + vec(0, 0, FUrg * #[2]#4), clamp(1 - FP, 0, 1))
  719. }
  720. }
  721. else
  722. {
  723. #Check if it needs to step
  724. local Vel = E:vel():setZ(0)
  725. local Speed = ((Vel:length() * 1.5) / 15)
  726.  
  727. local WR = rangerOffset(FootRangerLen, E:toWorld(vec(0.1, 30, -4)) + clamp(Vel / 1.5, -vec(150), vec(150)), -E:up())
  728. local NeedsToStep = (FPL:distance(WR:pos()) > (1#[ + Speed*0 / 15]#))
  729.  
  730. if(NeedsToStep)
  731. {
  732. #Needs to step
  733. FP = 0
  734. FW = 1
  735.  
  736. FOL = LFPos
  737. FNL = WR:pos()
  738. FUrg = clamp(Speed*1.3 + ((E:angVelVector():length()) * 2/150), 6, 35)
  739. }
  740. else
  741. {
  742. #Doesnt need to step
  743. FI = !FI
  744. }
  745. }
  746. }
  747. else
  748. {
  749. #Right foot
  750. if(FW)
  751. {
  752. #Walking
  753. if(FP >= 0.6)
  754. {
  755. #Finished, reset it all
  756. holoEntity(8):soundPlay("footstepR", 0.6, "npc/dog/dog_servo5.wav")
  757. #holoEntity(8):soundPlay("footstepR", 0.6, "mvm/giant_pyro/giant_pyro_step_03.wav")
  758.  
  759. FPR = FNR
  760. FP = 0
  761. FW = 0
  762. FI = !FI
  763. }
  764. else
  765. {
  766. #Increment progress, do bezier curves and all
  767. FP += 0.05 * (FUrg / #[4]#8) + 0.15
  768. FPR = bezierC(FOR, FNR, mix(FOR, FNR, 0.5) + vec(0, 0, FUrg * 4#[2]#), clamp(1 - FP, 0, 1))
  769. }
  770. }
  771. else
  772. {
  773. #Check if it needs to step
  774. local Vel = E:vel():setZ(0)
  775. local Speed = ((Vel:length() * 1.5) / 15)
  776.  
  777. local WR = rangerOffset(FootRangerLen, E:toWorld(vec(0.1, -30, -4)) + clamp(Vel / 1.5, -vec(150), vec(150)), -E:up())
  778. local NeedsToStep = (FPR:distance(WR:pos()) > (1 #[+ Speed*0 / 15]#))
  779.  
  780. if(NeedsToStep)
  781. {
  782. #Needs to step
  783. FP = 0
  784. FW = 1
  785.  
  786. FOR = RFPos
  787. FNR = WR:pos()
  788. FUrg = clamp(Speed*1.3 + ((E:angVelVector():length()) * 2/150), 6, 35)
  789. }
  790. else
  791. {
  792. #Doesnt need to step
  793. FI = !FI
  794. }
  795. }
  796. }
  797. }
  798. if(changed(RunRangerL:hit())&RunRangerL:hit()&Sprinting){
  799. holoEntity(4):soundPlay("footRunL", 0.6, "npc/dog/dog_footstep_run" + randint(1,8) + ".wav")
  800. holoEntity(4):soundPlay("footstepL", 0.6, "npc/dog/dog_servo5.wav")
  801. }
  802. if(changed(RunRangerR:hit())&RunRangerR:hit()&Sprinting){
  803. holoEntity(8):soundPlay("footRunR", 0.6, "npc/dog/dog_footstep_run" + randint(1,8) + ".wav")
  804. holoEntity(8):soundPlay("footstepR", 0.6, "npc/dog/dog_servo5.wav")
  805. }
  806. }
  807. else
  808. {
  809. RFVel += $RFPos / 3
  810. RFVel *= 0.4
  811.  
  812. LFVel += $LFPos / 3
  813. LFVel *= 0.4
  814. }
  815. if(changed(RD:hit())|changed(Sprinting)){
  816. RFVel = vec()
  817. LFVel = vec()
  818.  
  819. FI = 0
  820. FP = 0
  821. FW = 0
  822. FPL = LR:pos()
  823. FPR = RR:pos()
  824. FOL = LR:pos()
  825. FOR = RR:pos()
  826. FNL = LR:pos()
  827. FNR = RR:pos()
  828. if(RD:hit()&!Sprinting){
  829. soundPlay("impact",0.5,"npc/dog/dog_footstep_run"+randint(1,8)+".wav")
  830. E:propGravity(0)
  831. }
  832. if(!RD:hit()){
  833. E:propGravity(1)
  834. }
  835. }
  836. if(Sprinting | !RD:hit()){
  837. holoParent(1000,E)
  838. holoParent(2000,E)
  839. }
  840. if(!Sprinting & RD:hit()){
  841. holoUnparent(1000)
  842. holoUnparent(2000)
  843. }
  844. if(!Sprinting&!Flying&Energy<50&Charge_Delay == 0){
  845. Energy+=0.5
  846. }
  847. if(Flying){
  848. Energy-=1
  849. }
  850. if(Sprinting){
  851. Energy-=0.15
  852. }
  853. if(changed(Energy<0.5)&Energy<0.5){
  854. Charge_Delay = 1
  855. timer("charge_delay",3000)
  856. E:soundPlay("OUT_OF_ENERGY",0.276,"buttons/blip2.wav")
  857. }
  858. if(clk("charge_delay")){
  859. Charge_Delay = 0
  860. stoptimer("charge_delay")
  861. E:soundPlay("Delay_over",1,"buttons/button3.wav")
  862. }
  863. if(changed(Energy>49)&Energy>49){
  864. E:soundPlay("Power_Restored",0.692,"hl1/fvox/bell.wav")
  865. }
  866.  
  867. soundPitch(1,Energy+50)
  868. if(changed(Spc)&Spc&Energy>0){
  869. E:soundPlay(1,0,"thrusters/jet03.wav")
  870. }
  871. if(changed(Spc)&!Spc|Energy<1){
  872. soundStop(1)
  873. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement