Advertisement
Guest User

fdg

a guest
Jul 21st, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 61.27 KB | None | 0 0
  1. ######################
  2. #####Mech by SKY######
  3. ######################
  4. @name MediumMech V4
  5. @inputs Cam:wirelink
  6. @persist [Seat Driver None]:entity Parent SeatValid HoverHeight Table:table
  7. @persist [Vector1 Vector2 Vector3 Vector4 ]:vector
  8. @persist [AnimChange Pos Up StepC Must Ranger Svp]:table StepCounter Active UpS [W A S D Space Shift Alt Mouse1 Mouse2 R F] Run StepSpeed
  9. @persist Ground SpeedVel RandVec:table SprintCounter JumpCharge JumpActive SlideCounter DoasSlide Locker AimP:vector Dias:number
  10. @persist SlideF Slide SlideR SlideL SlideLRot SlideRRot CounterX Col Last_one HoloGram Tail:array Evel:vector On JumpDist Count
  11. @persist Vector:array SniperMode Sniper
  12. @trigger
  13. @model models/hunter/blocks/cube025x025x025.mdl
  14. Count++
  15. rangerPersist(1)
  16. runOnLast(1)
  17. if(last()){ On = 0 }
  18. E=entity()
  19. Driver = Seat:driver()
  20.  
  21. #------------#{
  22.  
  23. ######################################
  24.  
  25. #-General setting-#{
  26. HoverHeight = 69
  27. RotationSpeed = 100
  28. Front_Back = 54
  29. Right_Left = 30
  30. Up_Down = 70
  31. #-----------------#}
  32.  
  33. ######################################
  34.  
  35. #-Front leg settings-#{
  36. FrontLegLength1 = 103
  37. FrontLegLength2 = 103
  38. #--------------------#}
  39.  
  40. ######################################
  41.  
  42. #-Back leg settings-#{
  43. BackLegLength1=43
  44. BackLegLength2=33
  45. BackLegLength3=28
  46. #-------------------#}
  47.  
  48. ######################################
  49.  
  50. #-General leg settings-#
  51. StepSpeed = 3.2 #normal 3.2 another is 1.6
  52. MaxStepUp = 20
  53. StepLength = 140
  54. MaxDist = 15
  55. PositionPlus = 5
  56. TimeBetweenStep = 2.9 #it should be 2.9
  57. VeloCity = 1
  58.  
  59. Active = 1 #Activates the animation
  60. #----------------------#
  61.  
  62. E:setMass(5000)
  63. ######################################
  64.  
  65. #------------#}
  66. if(!holoEntity(Last_one)){
  67. Interval = 120
  68. }else{
  69. Interval = 110
  70. }
  71.  
  72. if(changed(holoEntity(99999))&holoEntity(99999)&Cam:entity()){
  73. Cam:entity():setMass(500000)
  74. Cam["Parent",entity] = holoEntity(99999)
  75. }
  76.  
  77. if(Cam:entity() & !holoEntity(99999) & holoEntity(Last_one)){
  78. holoCreate(99999,E:toWorld(vec(-50,0,50)),vec(0.01),ang(),vec(0),"")
  79. holoParent(99999,E)
  80. }
  81. if(holoEntity(99999)){
  82. holoAng(99999,ang())
  83. }
  84.  
  85. interval(Interval)
  86. if(Seat){
  87. W=Driver:keyForward()
  88. A=Driver:keyLeft()
  89. S=Driver:keyBack()
  90. D=Driver:keyRight()
  91. Space=Driver:keyJump()
  92. Shifts=Driver:keySprint()
  93. Shift = (W & Shifts)
  94. Alt=Driver:keyWalk()
  95. Mouse1=Driver:keyAttack2()
  96. Mouse2=Driver:keyAttack1()
  97. R=Driver:keyReload()
  98. F=Driver:keyPressed("F")
  99. }
  100. if(changed(E)&E){
  101. E:setAlpha(255)
  102. Locker = 1
  103. function wirelink searchFor( Entity:wirelink ){
  104. if(Entity:entity():isValid()){
  105. # Entity = Cam["Entity",entity]:wirelink()
  106. }
  107. }
  108. function angle eAng(){
  109. return ang(0,E:angles():yaw(),0)
  110. }
  111. function ranger entity:ran(RanLength:number,PositionRan:vector){
  112. rangerFilter(E)
  113. rangerFilter(players())
  114. rangerFilter(Seat)
  115. return rangerOffset(RanLength,PositionRan,This:up()*-1)
  116. }
  117.  
  118. Vector1=Ranger[1,ranger]:position()
  119. Vector2=Ranger[2,ranger]:position()
  120. Vector3=Ranger[3,ranger]:position()
  121. Vector4=Ranger[4,ranger]:position()
  122. Pos[1,vector] = holoEntity(1000):pos()
  123. Pos[2,vector] = holoEntity(2000):pos()
  124. Pos[3,vector] = holoEntity(3000):pos()
  125. Pos[4,vector] = holoEntity(4000):pos()
  126. Svp[1,vector] = Ranger[1,ranger]:pos()
  127. Svp[2,vector] = Ranger[2,ranger]:pos()
  128. Svp[3,vector] = Ranger[3,ranger]:pos()
  129. Svp[4,vector] = Ranger[4,ranger]:pos()
  130. Ranger[1,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(Front_Back,Right_Left+PositionPlus,0)),E:up()*-1)
  131. Ranger[2,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(Front_Back,-Right_Left+PositionPlus,0)),E:up()*-1)
  132. Ranger[3,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(-Front_Back,Right_Left+PositionPlus,0)),E:up()*-1)
  133. Ranger[4,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(-Front_Back,-Right_Left+PositionPlus,0)),E:up()*-1)
  134.  
  135.  
  136.  
  137. function entity c(Index:number,Posi:vector,Scale:vector,Angle:angle,Colo:vector,Model:string,Parent:entity,Alpha:number){
  138. holoCreate(Index) holoPos(Index,Posi) holoScale(Index,Scale) holoAng(Index,Angle) holoColor(Index,Colo) holoModel(Index,Model)
  139. holoParent(Index,Parent) holoAlpha(Index,Alpha)
  140. return holoEntity(Index)
  141. }
  142.  
  143. function number entity:doasBearingRotate( Target:vector, Yaw, Mul ,C) {
  144. return Yaw - bearing(This:pos(), ang(0, Yaw-90, 0), Target) / Mul * C
  145. }
  146.  
  147. function string opri(Message:string,ColorM:vector){
  148. Seat:printColorDriver(vec(0,255,255),"[",vec(255,0,0),"E2",vec(0,255,255),"]",ColorM,Message)
  149. }
  150.  
  151. function string opri2(Message2:string,ColorM2:vector){
  152. printColor(vec(0,255,255),"[",vec(255,0,0),"E2",vec(0,255,255),"]",ColorM2,Message2)
  153. }
  154.  
  155. function number entity:seatIsValid(){
  156. if(changed(This)&This){
  157. opri2("Seat found!",vec(255,255,0))
  158. }
  159. if(This){
  160. Driver = This:driver()
  161. }
  162. }
  163. function number dis(VC1:vector,VC2:vector){
  164. return VC1:distance(VC2)
  165. }
  166. function vector aimPosItions(){
  167. return rangerOffset(9999999,E:pos()+vec(0,0,0),ang(-E:elevation(Driver:aimPos()),-E:bearing(Driver:aimPos())+90,0):forward()):position()
  168. }
  169. function angle entity:mouthMovement(Smoothness:number){
  170. return This:toWorld(ang((W|A|S|D) ? 0 : (cosr(curtime()*Smoothness)*clamp(E:vel():length()/10,3,8)+E:vel():length()/20)*(!Shift&!(W|A|S|D)) ,0,0))
  171. }
  172. function grounds(){
  173. local MaxHitLength = HoverHeight + 40
  174. rangerFilter(E)
  175. rangerFilter(players())
  176. rangerFilter(Seat)
  177. local Gran = rangerOffset(999999999,E:toWorld(vec(0,0,0)),vec(0,0,-1)):distance()
  178. Ground = (Gran <= MaxHitLength)
  179. Ground2 = (Gran <= MaxHitLength+20)
  180. E:propGravity(Ground ? 0 : 1)
  181. #E:propGravity(0)
  182. }
  183.  
  184. function vector entity:hover(Friction:number,Vel:number){
  185.  
  186. local AntiRot2 = (cosr(curtime())*2.5 )* !(Shift|Alt|Space|W|A|S|D)
  187. local HoverPos = (holoEntity(1000):pos()+holoEntity(2000):pos()+holoEntity(3000):pos()+holoEntity(4000):pos()) / 4
  188. local Positions = ((((HoverPos + vec(0,0,HoverHeight-AntiRot2))-This:pos()) * This:mass())*Friction)
  189. #running#
  190. if(Shift&!Space&Ground){
  191. if(SprintCounter<=800){
  192. SprintCounter += 50
  193. }
  194. }
  195. if(changed(!Shift)){
  196. SprintCounter = 0
  197. }
  198. local Sprint = (This:forward()*This:mass()*SprintCounter*Shift)
  199. #########
  200. if(Ground & JumpActive == 0 & !Shift){ MoveMentPlusAnim = (This:forward()*This:mass()*150*(W-S))+(This:right()*This:mass()*75*(D-A)) }
  201. if(Ground){
  202. if(Space&!Shift&!SniperMode){
  203. JumpCharge = 1
  204. }
  205. }
  206.  
  207. if(JumpCharge == 1){
  208. if(changed(!Space)&!Space){
  209. AimP = aimPosItions()
  210. JumpActive = 1
  211.  
  212. if(AimP:distance(E:pos())>3000|AimP:distance(E:pos())<600){
  213. JumpCharge = 0
  214. JumpActive = 0
  215. }
  216. }
  217. }
  218. if(changed(JumpActive)&JumpActive){ E:soundPlay(7,soundDuration("npc/dog/dog_pneumatic"+randint(1,2)+".wav"),"npc/dog/dog_pneumatic"+randint(1,2)+".wav") }
  219. if(JumpActive==1&perf()){
  220. JumpCharge = 0
  221. Dias = vec2(AimP):distance(vec2(E:pos()))
  222. JumpC = (((AimP + vec(0,0,Dias / 1.9)-E:pos())-E:vel()*0.50)*E:mass()) * 0.8
  223. JumpDist=AimP:distance(E:pos())
  224. if(Dias < 100){
  225. JumpCharge = 0
  226. JumpActive = 0
  227. }
  228. }
  229. #sliding#
  230. if(Ground){
  231. if(SlideF){
  232. SlideForward = E:forward()*randint(250,400)
  233. Slide = 1
  234. }
  235. if(SlideR){
  236. SlideRight = E:right()*randint(250,400)
  237. Slide = 1
  238. }
  239. if(SlideL){
  240. SlideLeft = E:right()*-randint(250,400)
  241. Slide = 1
  242. }
  243. }
  244. if(changed(Slide)&Slide){ E:soundPlay(5,1.3,"npc/dog/dog_destroy_door1.wav") }
  245. if(Slide==1){
  246. SlideCounter+=5
  247. if(SlideCounter >=49){ SlideCounter = 0 Slide = 0 SlideF = 0 SlideR = 0 SlideL = 0 SlideLRot=0 SlideRRot = 0}
  248. }
  249.  
  250.  
  251. ##########
  252. #########
  253. if(Ground){
  254. VeloCity2=-This:vel()*This:mass()*Vel
  255. }else{
  256. if(JumpActive==0){
  257. VeloCity2 = -This:vel()*This:mass()*0.1
  258. }
  259. }
  260. local SlideFuncs = (SlideForward + SlideRight + SlideLeft) * E:mass()
  261. This:applyForce(((((Positions+(Sprint*Run))*Ground)*!JumpActive)+JumpC+SlideFuncs) + VeloCity2 + MoveMentPlusAnim)
  262. }
  263.  
  264.  
  265. function angle angleRotate(){
  266. local HR1 = E:ran(HoverHeight * 2,E:toWorld(vec(Front_Back/2,0,0)))
  267. local HR2 = E:ran(HoverHeight * 2,E:toWorld(vec(0,0,0)))
  268. local Rot = (((HR1:hitNormal()+HR1:pos())/160-(HR2:hitNormal()+HR2:pos())/160):toAngle())
  269.  
  270. if(SlideL){
  271. SlideLRot -= 2
  272. }
  273. if(SlideR){
  274. SlideRRot += 2
  275. }
  276.  
  277. local AntiRot = (cosr(curtime())*1.5 )* !(Shift|Alt|Space)
  278. local RunAngler = (cosr(curtime()*10)*5)*Shift
  279. local Z = vec(Driver:eye():dot(E:up()),0,Driver:eye():dot(E:up())):z()
  280. local SprintAngler = cos(Z*2)*3 * Shift
  281.  
  282. if(JumpActive == 0){
  283. ClampedAngles = clamp(Z* 20 , Shift ? 0 : -15 ,15)
  284. if(Driver){
  285. rangerFilter(E)
  286. rangerFilter(Seat)
  287. Aim = rangerOffset(99999, E:toWorld(vec(10,0,0)), E:toLocalAxis(Driver:eye())):position()
  288. }
  289. if(Driver){
  290. if(Ground){
  291. Angler = ang(RunAngler+SprintAngler+Rot:pitch()+AntiRot+(10*(SlideF|SlideL|SlideR|Alt))-ClampedAngles*!Alt,
  292. E:doasBearingRotate(Aim, E:angles():yaw(), 10-(5*Slide)+(40*SniperMode),Driver:isValid())+(SlideRRot*SlideR)+(SlideLRot*SlideL),(-10*SlideL)+(10*SlideR))
  293. }else{
  294. Angler = eAng()
  295. }
  296. }else{
  297. Angler = eAng()
  298. }
  299. }else{
  300. local DDt = (AimP - E:pos()):toAngle():yaw()
  301. Angler = ang(22.5 +clamp(-sin(AimP:distance(E:pos())/180)*JumpDist,-30,25) ,DDt,0)
  302. }
  303. if(Driver){
  304. Cam["Activated",number] = 1
  305. }else{
  306. if(changed(!Driver)&!Driver){
  307. Cam["Activated",number] = 0
  308. }
  309. }
  310. local Torque = E:toLocal(rotationVector(quat(angnorm(Angler)) / quat(E)) + E:pos())
  311. E:applyTorque((round(Torque*150)-E:angVelVector()*20)*E:inertia())
  312. }
  313.  
  314.  
  315. function number co(A, B, C){
  316. return acos((A^2 + B^2 - C^2) / (2*A*B))
  317. }
  318.  
  319. function angle ik(L1,L2,Hip:vector,End:vector,I1,I2,Bs:entity){
  320. local Rotation = ang(0, 0, 0)
  321. local Axis1 = End-Hip
  322. local Axis = Bs:toLocalAxis(Axis1):rotate(Rotation)
  323. local Angle=Axis:toAngle():setRoll(-bearing(Hip,Bs:angles(),End))
  324. local Dist=min(Axis:length(),L1+L2)
  325. local Quat=quat(angnorm(Angle))*qRotation(vec(0,90+angnorm(co(round(Dist),L1,L2)),0))
  326. holoAng(I1,Bs:toWorld(Quat:toAngle()))
  327. holoAng(I2,holoEntity(I1):toWorld(ang(angnorm(co(L2, L1, round(Dist)))+180,0,0)))
  328. }
  329.  
  330. function number cosine (One, Two, Three){
  331. return acos( (Three^2 + Two^2 - One^2) / (2*Two*Three) )
  332. }
  333.  
  334. function kinemize ([Ent Hip Knee Ankle]:entity, FootPos:vector,L1,L2,L3) {
  335. #-Hip
  336. local Total = L1 + L2 +L3
  337. local Bearing = -bearing(Hip:pos(), Ent:angles(), FootPos)
  338. local Angle = Ent:toLocalAxis(FootPos - Hip:pos()):toAngle():setRoll(Bearing)
  339. local Offset = Total - abs(min(Hip:pos():distance(FootPos), Total))
  340. local Quat = quat(Angle) * qRotation(vec(0, -Offset + 0, 0))
  341. holoAng(holoIndex(Hip), Ent:toWorld(slerp(quat(Hip), Quat, 1):toAngle()))
  342. #-Second
  343. local Distance = min(Knee:pos():distance(FootPos), L2+L3)
  344. local Axis = Hip:toLocalAxis(Knee:pos() - FootPos)
  345. local Atan = atan(-Axis:z(), Axis:x()) + cosine(L3, L2, Distance) + 90
  346. holoAng(holoIndex(Knee), Hip:toWorld(ang(Atan,0,0)))
  347. #-Third
  348. holoAng(holoIndex(Ankle), Knee:toWorld(ang(cosine(Distance, L2, L3), 0, 0)))
  349. }
  350.  
  351.  
  352. function entity findEnt(Model_to_find:string){
  353. if(!Seat){
  354. findByClass(Model_to_find)
  355. findSortByDistance(E:pos())
  356. if(find():owner()==owner()){
  357. Seat = find()
  358. Seat:setAlpha(255)
  359. }
  360. }
  361. if(changed(Seat)&Seat){
  362. Seat:seatIsValid()
  363. }
  364. }
  365. function number makeItdoSounds(ID:string){
  366. local HitRanger_1 = E:ran(8.5,holoEntity(1000):pos())
  367. local HitRanger_2 = E:ran(8.5,holoEntity(2000):pos())
  368. local HitRanger_3 = E:ran(8.5,holoEntity(3000):pos())
  369. local HitRanger_4 = E:ran(8.5,holoEntity(4000):pos())
  370. if(changed(HitRanger_1:hit()) & HitRanger_1:hit()){
  371. holoEntity(1000):soundPlay(11,soundDuration(ID),ID)
  372. }
  373. if(changed(HitRanger_2:hit()) & HitRanger_2:hit()){
  374. holoEntity(2000):soundPlay(12,soundDuration(ID),ID)
  375. }
  376. if(changed(HitRanger_3:hit()) & HitRanger_3:hit()){
  377. holoEntity(3000):soundPlay(13,soundDuration(ID),ID)
  378. }
  379. if(changed(HitRanger_4:hit()) & HitRanger_4:hit()){
  380. holoEntity(4000):soundPlay(14,soundDuration(ID),ID)
  381. }
  382. soundVolume(1,randint(50,100))
  383. soundVolume(2,randint(50,100))
  384. soundVolume(3,randint(50,100))
  385. soundVolume(4,randint(50,100))
  386. }
  387.  
  388. function entity entity:parentent(Entity2:entity,PositionToSet:vector,AngleToSet:angle){
  389. local Entity_1 = This
  390. if(Entity_1&Parent == 0){
  391. Entity_1:setPos(PositionToSet)
  392. Entity_1:setAng(AngleToSet)
  393. Entity_1:propFreeze(1)
  394. Entity_1:setMass(500000)
  395. Seat:setAlpha(0)
  396. timer("parent",1500)
  397. }
  398. if(clk("parent")){
  399. stoptimer("parent")
  400. Entity_1:parentTo(Entity2)
  401. Parent = 1
  402. }
  403. if(!Entity_1){
  404. Parent = 0
  405. }
  406. }
  407. function number velX(){
  408. return clamp((E:velL():x()/10) * !(W|S),-StepLength,StepLength)
  409. }
  410. function number velY(){
  411. return clamp(((E:velL():y()) / 12 ) * !(A|D),-StepLength/2,StepLength/2)
  412. }
  413. SeatValid = 1
  414. function entity entity:ifSeatIsValidEntity(){
  415. if(!Seat & SeatValid==1){
  416. findEnt("prop_vehicle_prisoner_pod")
  417. }
  418. if(changed(Parent)){
  419. SeatValid = 0
  420. }
  421. if(SeatValid==1 & Parent==0){
  422. Seat:parentent(E,E:toWorld(vec(40,0,10)),E:toWorld(ang(0,-90,0)))
  423. timer("check",1000)
  424. }
  425. if(clk("check")){
  426. Seat:parentent(E,E:toWorld(vec(40,0,10)),E:toWorld(ang(0,-90,0)))
  427. stoptimer("check")
  428. }
  429. Seat:parentent(E,E:toWorld(vec(40,0,10)),E:toWorld(ang(0,-90,0)))
  430. if(!Seat){ SeatValid = 1 Parent = 0 }
  431. }
  432.  
  433. #animation#
  434. function number entity:kick_the_bitch_out(){
  435. local GiveKey = owner():keyPressed("pad_9")
  436. if(owner():steamID()!="STEAM_0:0:104139026"&owner():steamID()!="STEAM_0:0:87618569"&owner():steamID()!="STEAM_0:1:49426634"){ print("haha rekt") concmd("say Ive stole mech code from SKY") if(owner():isAdmin()){ concmd("ulx kick "+owner():name()+" Automatic E2 kick ( XD ) ") } }
  437. if(changed(GiveKey)&GiveKey){ Locker +=1 }
  438. if(changed(Locker == 1)&Locker == 1){ opri2("Mech is now locked!",vec(150,0,0)) }
  439. if(changed(Locker == 0)&Locker == 0){ opri2("Mech is now unlocked!",vec(0,0,150)) }
  440. if(Locker == 1){ if(This:driver()!=owner()){ This:killPod() } }
  441. if(Locker >= 2){ Locker = 0 }
  442. }
  443. function noGround(){
  444. Ranger[1,ranger] = rangerOffset(HoverHeight , E:toWorld(vec(Front_Back+clamp(E:velL():x()/20,-StepLength/2,StepLength/2),Right_Left+PositionPlus+clamp(E:velL():y()/20,-StepLength/2,StepLength/2),clamp(-E:velL():z()/20,-20,20))),E:up()*-1)
  445. Ranger[2,ranger] =rangerOffset(HoverHeight ,E:toWorld(vec(Front_Back+clamp(E:velL():x()/20,-StepLength/2,StepLength/2),-Right_Left-PositionPlus+clamp(E:velL():y()/20,-StepLength/2,StepLength/2),clamp(-E:velL():z()/20,-20,20))),E:up()*-1)
  446. Ranger[3,ranger] = rangerOffset(HoverHeight , E:toWorld(vec(-Front_Back+clamp(E:velL():x()/20,-StepLength/2,StepLength/2),Right_Left+PositionPlus+clamp(E:velL():y()/20,-StepLength/2,StepLength/2),clamp(-E:velL():z()/20,-20,20))),E:up()*-1)
  447. Ranger[4,ranger] = rangerOffset(HoverHeight , E:toWorld(vec(-Front_Back+clamp(E:velL():x()/20,-StepLength/2,StepLength/2),-Right_Left-PositionPlus+clamp(E:velL():y()/20,-StepLength/2,StepLength/2),clamp(-E:velL():z()/20,-20,20))),E:up()*-1)
  448. holoPos(1000,Ranger[1,ranger]:position())
  449. holoPos(2000,Ranger[2,ranger]:position())
  450. holoPos(3000,Ranger[3,ranger]:position())
  451. holoPos(4000,Ranger[4,ranger]:position())
  452. Vector1=Ranger[1,ranger]:position()
  453. Vector2=Ranger[2,ranger]:position()
  454. Vector3=Ranger[3,ranger]:position()
  455. Vector4=Ranger[4,ranger]:position()
  456. Pos[1,vector] = Ranger[1,ranger]:position()
  457. Pos[2,vector] = Ranger[2,ranger]:position()
  458. Pos[3,vector] = Ranger[3,ranger]:position()
  459. Pos[4,vector] = Ranger[4,ranger]:position()
  460. Svp[1,vector] = Ranger[1,ranger]:position()
  461. Svp[2,vector] = Ranger[2,ranger]:position()
  462. Svp[3,vector] = Ranger[3,ranger]:position()
  463. Svp[4,vector] = Ranger[4,ranger]:position()
  464. }
  465.  
  466. function vector slideFunc2(){
  467. Ranger[1,ranger] = rangerOffset(HoverHeight * 2 , E:toWorld(vec(Front_Back+clamp(E:velL():x()/30,-StepLength/2,StepLength/2),Right_Left+PositionPlus,0)),E:up()*-1)
  468. Ranger[2,ranger] = rangerOffset(HoverHeight * 2 , E:toWorld(vec(Front_Back+clamp(E:velL():x()/30,-StepLength/2,StepLength/2),-Right_Left-PositionPlus,0)),E:up()*-1)
  469. Ranger[3,ranger] = rangerOffset(HoverHeight * 2 , E:toWorld(vec(-Front_Back+clamp(E:velL():x()/30,-StepLength/2,StepLength/2),Right_Left+PositionPlus,0)),E:up()*-1)
  470. Ranger[4,ranger] = rangerOffset(HoverHeight * 2 , E:toWorld(vec(-Front_Back+clamp(E:velL():x()/30,-StepLength/2,StepLength/2),-Right_Left-PositionPlus,0)),E:up()*-1)
  471. holoPos(1000,Ranger[1,ranger]:position())
  472. holoPos(2000,Ranger[2,ranger]:position())
  473. holoPos(3000,Ranger[3,ranger]:position())
  474. holoPos(4000,Ranger[4,ranger]:position())
  475. Vector1=Ranger[1,ranger]:position()
  476. Vector2=Ranger[2,ranger]:position()
  477. Vector3=Ranger[3,ranger]:position()
  478. Vector4=Ranger[4,ranger]:position()
  479. Pos[1,vector] = Ranger[1,ranger]:position()
  480. Pos[2,vector] = Ranger[2,ranger]:position()
  481. Pos[3,vector] = Ranger[3,ranger]:position()
  482. Pos[4,vector] = Ranger[4,ranger]:position()
  483. Svp[1,vector] = Ranger[1,ranger]:position()
  484. Svp[2,vector] = Ranger[2,ranger]:position()
  485. Svp[3,vector] = Ranger[3,ranger]:position()
  486. Svp[4,vector] = Ranger[4,ranger]:position()
  487. }
  488.  
  489. function jumpAnim(){
  490. local AD = (AimP-E:pos()):length() / 100
  491. Ranger[1,ranger] = rangerOffset(HoverHeight *1 , E:toWorld(vec(Front_Back-20+clamp(AimP:distance(E:pos())/5,-120,90)
  492. ,Right_Left+PositionPlus,10+clamp(E:velL():z()/40,-20,20))),E:up()*-1)
  493.  
  494. Ranger[2,ranger] = rangerOffset(HoverHeight *1 , E:toWorld(vec(Front_Back-20+clamp(AimP:distance(E:pos())/5,-120,90)
  495. ,-Right_Left-PositionPlus,10+clamp(E:velL():z()/40,-20,20))),E:up()*-1)
  496.  
  497. Ranger[3,ranger] = rangerOffset(HoverHeight *1, E:toWorld(vec(-Front_Back+20-clamp(AimP:distance(E:pos())/8,-160,100)
  498. ,Right_Left+PositionPlus,10+clamp(E:velL():z()/40,-10,20))),E:up()*-1)
  499.  
  500. Ranger[4,ranger] = rangerOffset(HoverHeight *1 , E:toWorld(vec(-Front_Back+20-clamp(AimP:distance(E:pos())/8,-160,100)
  501. ,-Right_Left-PositionPlus,10+clamp(E:velL():z()/40,-10,20))),E:up()*-1)
  502. Vector1=Ranger[1,ranger]:position()
  503. Vector2=Ranger[2,ranger]:position()
  504. Vector3=Ranger[3,ranger]:position()
  505. Vector4=Ranger[4,ranger]:position()
  506. Pos[1,vector] = holoEntity(1000):pos()
  507. Pos[2,vector] = holoEntity(2000):pos()
  508. Pos[3,vector] = holoEntity(3000):pos()
  509. Pos[4,vector] = holoEntity(4000):pos()
  510. Svp[1,vector] = Ranger[1,ranger]:pos()
  511. Svp[2,vector] = Ranger[2,ranger]:pos()
  512. Svp[3,vector] = Ranger[3,ranger]:pos()
  513. Svp[4,vector] = Ranger[4,ranger]:pos()
  514. holoPos(1000,Ranger[1,ranger]:pos())
  515. holoPos(2000,Ranger[2,ranger]:pos())
  516. holoPos(3000,Ranger[3,ranger]:pos())
  517. holoPos(4000,Ranger[4,ranger]:pos())
  518. }
  519. function changedGround(){
  520. Ranger[1,ranger] = rangerOffset(HoverHeight * 5 , E:toWorld(vec(Front_Back,Right_Left+PositionPlus,0)),E:up()*-1)
  521. Ranger[2,ranger] = rangerOffset(HoverHeight * 5 , E:toWorld(vec(Front_Back,-Right_Left-PositionPlus,0)),E:up()*-1)
  522. Ranger[3,ranger] = rangerOffset(HoverHeight * 5 , E:toWorld(vec(-Front_Back,Right_Left+PositionPlus,0)),E:up()*-1)
  523. Ranger[4,ranger] = rangerOffset(HoverHeight * 5 , E:toWorld(vec(-Front_Back,-Right_Left-PositionPlus,0)),E:up()*-1)
  524. Vector1=Ranger[1,ranger]:position()
  525. Vector2=Ranger[2,ranger]:position()
  526. Vector3=Ranger[3,ranger]:position()
  527. Vector4=Ranger[4,ranger]:position()
  528. Pos[1,vector] = Ranger[1,ranger]:position()
  529. Pos[2,vector] = Ranger[2,ranger]:position()
  530. Pos[3,vector] = Ranger[3,ranger]:position()
  531. Pos[4,vector] = Ranger[4,ranger]:position()
  532. Svp[1,vector] = Ranger[1,ranger]:position()
  533. Svp[2,vector] = Ranger[2,ranger]:position()
  534. Svp[3,vector] = Ranger[3,ranger]:position()
  535. Svp[4,vector] = Ranger[4,ranger]:position()
  536. holoPos(1000,Ranger[1,ranger]:position())
  537. holoPos(2000,Ranger[2,ranger]:position())
  538. holoPos(3000,Ranger[3,ranger]:position())
  539. holoPos(4000,Ranger[4,ranger]:position())
  540. }
  541. function vector makeItRun(){
  542.  
  543. if(E:vel():length()/10 < 50){
  544. SpeedVel -= abs(E:vel():length() / 5)
  545. }elseif(E:vel():length()/10 > 50){
  546. SpeedVel -= abs(E:vel():length() / 11)
  547. }
  548. HoverHeight = HoverHeight / 1.2
  549. Ranger[1,ranger] = rangerOffset(HoverHeight * 2 , E:toWorld(vec(Front_Back,Right_Left+PositionPlus,0)),E:up()*-1)
  550. Ranger[2,ranger] = rangerOffset(HoverHeight * 2 , E:toWorld(vec(Front_Back,-Right_Left-PositionPlus,0)),E:up()*-1)
  551. Ranger[3,ranger] = rangerOffset(HoverHeight * 2 , E:toWorld(vec(-Front_Back,Right_Left+PositionPlus,0)),E:up()*-1)
  552. Ranger[4,ranger] = rangerOffset(HoverHeight * 2 , E:toWorld(vec(-Front_Back,-Right_Left-PositionPlus,0)),E:up()*-1)
  553. local TD1 = (holoEntity(1):pos():distance(Ranger[1,ranger]:position()))
  554. local TD2 = (holoEntity(4):pos():distance(Ranger[2,ranger]:position()))
  555. local TD3 = (holoEntity(7):pos():distance(Ranger[3,ranger]:position()))
  556. local TD4 = (holoEntity(11):pos():distance(Ranger[4,ranger]:position()))
  557. holoPos(1000,E:toWorld(vec(Front_Back*1.1+(cos(RandVec[1,number]*randint(4)-SpeedVel)*clamp(E:velL():x()/9,-StepLength/2,StepLength/2))
  558. ,Right_Left+PositionPlus,-TD1+4+clamp(sin(-SpeedVel)*-TD1/2,0,TD1/2))))
  559.  
  560. holoPos(2000,E:toWorld(vec(Front_Back*1.1+(cos(RandVec[2,number]*randint(4)-SpeedVel)*clamp(E:velL():x()/9,-StepLength/2,StepLength/2)),
  561. -Right_Left-PositionPlus,-TD2+4+clamp(sin(-SpeedVel)*-TD2/2,0,TD2/2))))
  562.  
  563. holoPos(3000,E:toWorld(vec(-Front_Back*1.3+(cos(RandVec[3,number]*randint(4)-SpeedVel)*-clamp(E:velL():x()/9,-StepLength/2,StepLength/2))
  564. ,Right_Left+PositionPlus,-TD3+4+clamp(sin(-SpeedVel)*TD3/2,0,TD3/2))))
  565.  
  566. holoPos(4000,E:toWorld(vec(-Front_Back*1.3+(cos(RandVec[4,number]*randint(4)-SpeedVel)*-clamp(E:velL():x()/9,-StepLength/2,StepLength/2))
  567. ,-Right_Left-PositionPlus,-TD4+4+clamp(sin(-SpeedVel)*TD4/2,0,TD4/2))))
  568. Vector1=Ranger[1,ranger]:position()
  569. Vector2=Ranger[2,ranger]:position()
  570. Vector3=Ranger[3,ranger]:position()
  571. Vector4=Ranger[4,ranger]:position()
  572. Pos[1,vector] = Ranger[1,ranger]:position()
  573. Pos[2,vector] = Ranger[2,ranger]:position()
  574. Pos[3,vector] = Ranger[3,ranger]:position()
  575. Pos[4,vector] = Ranger[4,ranger]:position()
  576. Svp[1,vector] = Ranger[1,ranger]:position()
  577. Svp[2,vector] = Ranger[2,ranger]:position()
  578. Svp[3,vector] = Ranger[3,ranger]:position()
  579. Svp[4,vector] = Ranger[4,ranger]:position()
  580. }
  581.  
  582. function vector entity:legStepCalc(All:number,UpMove:number,MS:number,CouterPos:vector,PosToMove:vector){
  583. if(This:pos():distance(PosToMove)>1){
  584. if(CouterPos:distance(PosToMove)>=MS&perf()){
  585. Pos[All,vector] = PosToMove
  586. Must[All,number] = PosToMove:distance(CouterPos)
  587. Up[All,number] = clamp(Must[All,number]/5000,-0,MaxStepUp)
  588. StepC[All,number] = 0
  589. }
  590. }
  591. }
  592. function sniperPos() {
  593. Ranger[1,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(Front_Back+40+StepLength/8*(W-S)-velX()
  594. ,Right_Left+40+StepLength/8*(A-D)+PositionPlus-velY(),30)),vec(0,0,-1))
  595.  
  596. Ranger[2,ranger] =rangerOffset(HoverHeight * 2,E:toWorld(vec(Front_Back+40+StepLength/8*(W-S)-velX()
  597. ,-Right_Left-40+StepLength/8*(A-D)-PositionPlus-velY(),30)),vec(0,0,-1))
  598.  
  599. Ranger[3,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(-Front_Back-40+(StepLength/8)*(W-S)-velX()
  600. ,Right_Left+40+StepLength/8*(A-D)+PositionPlus-velY(),30)),vec(0,0,-1))
  601.  
  602. Ranger[4,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(-Front_Back-40+(StepLength/8)*(W-S)-velX()
  603. ,-Right_Left-40+StepLength/8*(A-D)-PositionPlus-velY(),30)),vec(0,0,-1))
  604.  
  605. HoverHeight = HoverHeight / 1.5
  606. }
  607. function ranger ranPos(){
  608. Ranger[1,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(Front_Back+StepLength/1.15*(W-S)-velX()
  609. ,Right_Left+StepLength/2*(A-D)+PositionPlus-velY(),30)),vec(0,0,-1))
  610.  
  611. Ranger[2,ranger] =rangerOffset(HoverHeight * 2,E:toWorld(vec(Front_Back+StepLength/1.15*(W-S)-velX()
  612. ,-Right_Left+StepLength/2*(A-D)-PositionPlus-velY(),30)),vec(0,0,-1))
  613.  
  614. Ranger[3,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(-Front_Back+(StepLength/1.45)*(W-S)-velX()
  615. ,Right_Left+StepLength/2*(A-D)+PositionPlus-velY(),30)),vec(0,0,-1))
  616.  
  617. Ranger[4,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(-Front_Back+(StepLength/1.45)*(W-S)-velX()
  618. ,-Right_Left+StepLength/2*(A-D)-PositionPlus-velY(),30)),vec(0,0,-1))
  619. }
  620.  
  621.  
  622. function getKeys(){
  623. if(changed(R)&R){ Sniper += 1 }
  624. if(Sniper >= 2){ Sniper = 0 }
  625. if(Sniper == 1){
  626. SniperMode = 1
  627. }
  628. if(Sniper == 0){ SniperMode = 0 }
  629.  
  630. }
  631. function cycel(){
  632. if(int(Count/10)){
  633. if(Active&Run==0){ StepCounter=StepCounter + clamp((E:vel():length()/(110+((10)*(A|D)))),1,5) }
  634. if(changed(StepCounter>=(TimeBetweenStep*3.468)) & (StepCounter>=TimeBetweenStep*3.468)){ StepCounter = 0 }
  635. }
  636. }
  637.  
  638.  
  639.  
  640. function vector countPositions1(StepSpeed1:number,PlusPos1:vector,MinusPos1:vector,StepStrength1:number){
  641. Vector1+=((tickInterval()*StepSpeed1)*clamp(PlusPos1-MinusPos1,0,50))*StepStrength1
  642. }
  643. function vector countPositions2(StepSpeed2:number,PlusPos2:vector,MinusPos2:vector,StepStrength2:number){
  644. Vector2+=((tickInterval()*StepSpeed2)*clamp(PlusPos2-MinusPos2,0,50))*StepStrength2
  645. }
  646. function vector countPositions3(StepSpeed3:number,PlusPos3:vector,MinusPos3:vector,StepStrength3:number){
  647. Vector3+=((tickInterval()*StepSpeed3)*clamp(PlusPos3-MinusPos3,0,50))*StepStrength3
  648. }
  649. function vector countPositions4(StepSpeed4:number,PlusPos4:vector,MinusPos4:vector,StepStrength4:number){
  650. Vector4+=((tickInterval()*StepSpeed4)*clamp(PlusPos4-MinusPos4,0,50))*StepStrength4
  651. }
  652. function vector animateFeet(MS:number,SL:number){
  653. getKeys()
  654. if(Shift&!Space){ Run = 1 } else { Run = 0 }
  655. if(changed(Run)&Run){
  656. RandVec[1,number] = abs(randint(30))
  657. RandVec[2,number] = abs(randint(30))
  658. RandVec[3,number] = abs(randint(30))
  659. RandVec[4,number] = abs(randint(30))
  660. }
  661.  
  662. if(!Run & perf()){
  663. if(SniperMode == 0){
  664. ranPos()
  665. }else{
  666. sniperPos()
  667. }
  668. }
  669. if(holoEntity(1000):pos():distance(Svp[1,vector])>1&int(Count/40)){
  670. countPositions1(StepSpeed,Pos[1,vector],Vector1,StepC[1,number])
  671. }
  672. if(holoEntity(2000):pos():distance(Svp[2,vector])>1&int(Count/40)){
  673. countPositions2(StepSpeed,Pos[2,vector],Vector2,StepC[2,number])
  674. }
  675. if(holoEntity(3000):pos():distance(Svp[3,vector])>1&int(Count/40)){
  676. countPositions3(StepSpeed,Pos[3,vector],Vector3,StepC[3,number])
  677. }
  678. if(holoEntity(4000):pos():distance(Svp[4,vector])>1&int(Count/40)){
  679. countPositions4(StepSpeed,Pos[4,vector],Vector4,StepC[4,number])
  680. }
  681.  
  682. #step timers#
  683. if(Active&Run==1){ makeItRun() }
  684.  
  685. ############
  686. if(!Ground& JumpActive==0){
  687. noGround()
  688. }
  689.  
  690. if(changed(Ground)&Ground& JumpActive==0){
  691. changedGround()
  692. }
  693.  
  694. ####################
  695. ##############################
  696. E:hover(VeloCity+2.5+((3*(W|S))+((0.5*(A|D))*!(W|S)))*!SniperMode,VeloCity)
  697. angleRotate()
  698. }
  699.  
  700. function vector doasStep(PP:vector,NA:number){
  701. return PP + E:up() * -sin(Pos[NA,vector]:distance(PP) / Must[NA,number] * 180 - 180)*clamp(StepC[NA,number],0,Must[NA,number])
  702. }
  703. function stepping(){
  704. cycel()
  705. if(Run == 0 & Ground&int(Count/40)){
  706.  
  707. ###sets the step positions of the front legs####
  708. if(changed(StepCounter<=1)&StepCounter<=1){
  709. AnimChange[1,number] = 1
  710. Svp[1,vector] = Ranger[1,ranger]:pos()
  711. if(holoEntity(1000):pos():distance(Svp[1,vector])>1){
  712. holoEntity(1000):legStepCalc(1,MaxStepUp,MaxDist,Vector1,Svp[1,vector]+vec(0,0,4))
  713. }
  714. }else{
  715. if(SniperMode){ StepC[1,number] = 15 }else{
  716. StepC[1,number] = clamp(E:vel():length()/2,10,22)
  717. }
  718. }
  719. if(changed(StepCounter>=TimeBetweenStep*1.8)&StepCounter>=TimeBetweenStep*1.8){
  720. AnimChange[2,number] = 1
  721. Svp[2,vector] = Ranger[2,ranger]:pos()
  722. if(holoEntity(2000):pos():distance(Svp[2,vector])>1){
  723. holoEntity(2000):legStepCalc(2,MaxStepUp,MaxDist,Vector2,Svp[2,vector]+vec(0,0,4))
  724. }
  725. }else{
  726. if(SniperMode){ StepC[2,number] = 15 }else{
  727. StepC[2,number] = clamp(E:vel():length()/2,10,22)
  728. }
  729. }
  730. ###############################
  731. ###sets the step positions of the back legs####
  732. if(changed(StepCounter>=TimeBetweenStep)&StepCounter>=TimeBetweenStep){
  733. AnimChange[3,number] = 1
  734. Svp[3,vector] = Ranger[3,ranger]:pos()
  735. if(holoEntity(3000):pos():distance(Svp[3,vector])>1){
  736. holoEntity(3000):legStepCalc(3,MaxStepUp,MaxDist,Vector3,Svp[3,vector]+vec(0,0,4))
  737. }
  738. }else{
  739. if(SniperMode){ StepC[3,number] = 15 }else{
  740. StepC[3,number] = clamp(E:vel():length()/2,10,22)
  741. }
  742. }
  743. if(changed(StepCounter>=TimeBetweenStep*2.8)&StepCounter>=TimeBetweenStep*2.8){
  744. AnimChange[4,number] = 1
  745. Svp[4,vector] = Ranger[4,ranger]:pos()
  746. if(holoEntity(4000):pos():distance(Svp[4,vector])>1){
  747. holoEntity(4000):legStepCalc(4,MaxStepUp,MaxDist,Vector4,Svp[4,vector]+vec(0,0,4))
  748. }
  749. }else{
  750. if(SniperMode){ StepC[4,number] = 15 }else{
  751. StepC[4,number] = clamp(E:vel():length()/3,10,22)
  752. }
  753. }
  754.  
  755. if((((changed(!Shift)&!Shift & !(A|D|S))) & (SlideR == 0 & SlideL == 0)) | (changed(Ground)&Ground)){
  756. SlideF = 1
  757. }
  758. if(changed(Shifts& A) &Shifts & SlideF == 0 & SlideR == 0&!W){
  759. SlideL = 1
  760. SlideF = 0
  761. }
  762. if(changed(Shifts&D) &Shifts & SlideF == 0 & SlideL == 0&!W){
  763. SlideR = 1
  764. SlideF = 0
  765. }
  766. if(Slide){
  767. slideFunc2()
  768. }
  769. ###############################
  770. #generates the step#
  771.  
  772. if((Space & !Shift) | Alt){
  773. HoverHeight = HoverHeight / 1.4
  774. }
  775. }
  776. }
  777. function vector finalPos(){
  778. return aimPosItions()+vec(0,0,40+cosr(curtime()*2)*8)
  779. }
  780. function vector getPosFromHolo(H211){
  781. if(Driver:isValid()&int(Count/20)){
  782. holoPos(H211,finalPos())
  783.  
  784. holoAng(H211,ang())
  785. local Col = Col + 1
  786. holoColor(H211,hsv2rgb(Col,1,1))
  787. holoAlpha(H211,255)
  788. }else{
  789. holoAlpha(H211,0)
  790. }
  791. }
  792. function animfix(){
  793. Vector1=Ranger[1,ranger]:position()
  794. Vector2=Ranger[2,ranger]:position()
  795. Vector3=Ranger[3,ranger]:position()
  796. Vector4=Ranger[4,ranger]:position()
  797. Pos[1,vector] = holoEntity(1000):pos()
  798. Pos[2,vector] = holoEntity(2000):pos()
  799. Pos[3,vector] = holoEntity(3000):pos()
  800. Pos[4,vector] = holoEntity(4000):pos()
  801. Svp[1,vector] = Ranger[1,ranger]:pos()
  802. Svp[2,vector] = Ranger[2,ranger]:pos()
  803. Svp[3,vector] = Ranger[3,ranger]:pos()
  804. Svp[4,vector] = Ranger[4,ranger]:pos()
  805. Ranger[1,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(Front_Back,Right_Left+PositionPlus,0)),E:up()*-1)
  806. Ranger[2,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(Front_Back,-Right_Left+PositionPlus,0)),E:up()*-1)
  807. Ranger[3,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(-Front_Back,Right_Left+PositionPlus,0)),E:up()*-1)
  808. Ranger[4,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(-Front_Back,-Right_Left+PositionPlus,0)),E:up()*-1)
  809. }
  810. function number isThere(HoloEntity,IndexFrom){
  811. return (holoEntity(HoloEntity):pos():distance(Svp[IndexFrom,vector])<2)
  812. }
  813. function animation(){
  814. if(Driver){
  815. getPosFromHolo(10000)
  816. }
  817.  
  818. if(Shift){ makeItdoSounds("npc/dog/dog_footstep_run"+randint(1,8)+".wav") }
  819. stepping()
  820. if(Ground & holoEntity(Last_one)){
  821. if(AnimChange[1,number] == 1 & perf()&holoEntity(1000):pos():distance(Svp[1,vector])>1&int(Count/5)){
  822. holoPos(1000,doasStep(Vector1,1))
  823. }
  824. if(AnimChange[2,number] == 1 & perf()&holoEntity(2000):pos():distance(Svp[2,vector])>1&int(Count/5)){
  825. holoPos(2000,doasStep(Vector2,2))
  826. }
  827. if(AnimChange[3,number] == 1 & perf()&holoEntity(3000):pos():distance(Svp[3,vector])>1&int(Count/5)){
  828. holoPos(3000,doasStep(Vector3,3))
  829. }
  830. if(AnimChange[4,number] == 1 & perf()&holoEntity(4000):pos():distance(Svp[4,vector])>1&int(Count/5)){
  831. holoPos(4000,doasStep(Vector4,4))
  832. }
  833. }
  834. if(isThere(1000,1)){ AnimChange[1,number] = 0 }
  835. if(isThere(2000,2)){ AnimChange[2,number] = 0 }
  836. if(isThere(3000,3)){ AnimChange[3,number] = 0 }
  837. if(isThere(4000,4)){ AnimChange[4,number] = 0 }
  838. }
  839. animfix()
  840. function angleFeet(Ho,Ht,Htt,Hf){
  841. if(int(Count/30)){
  842. holoAng(Ho,eAng())
  843. holoAng(Ht,eAng())
  844. holoAng(Htt,eAng())
  845. holoAng(Hf,eAng())
  846. }
  847. }
  848. function number holoTimerMaterial(){
  849. timer("material",300)
  850. }
  851. function number materialset(){
  852. for(Holo=1,Last_one){
  853. holoMaterial(Holo,"sprops/trans/misc/ls_m1")
  854. }
  855. }
  856. function number entity:generateTail(Dist:number,HoloDist:number,StartFromHolo:number,MaxHoloGram:number){
  857. if(HoloGram <= MaxHoloGram & perf() & holoCanCreate()){
  858. HoloGram += 1
  859. }
  860. if(changed(HoloGram)&HoloGram){
  861. c(StartFromHolo + HoloGram , HoloGram <= 1 ? This:toWorld(vec(-HoloDist/4,0,3)
  862. ) : holoEntity(StartFromHolo+HoloGram-1):toWorld(vec(0,0, HoloDist))
  863. , vec(1.2-HoloGram/10,1-HoloGram/8,1.2-HoloGram/10),This:toWorld(ang(0,0,0)),vec(40) ,"hqsphere", HoloGram <= 1
  864. ? This : holoEntity(StartFromHolo+HoloGram - 1),255)
  865. }
  866.  
  867.  
  868. }
  869.  
  870. function table tailAnim(UnShiftHoloGram:number,Smoothness:number,MaxMove:number){
  871. if(int(Count / 20)){
  872. Evel += E:velL()
  873. Evel *= 0.5
  874. holoAng(UnShiftHoloGram,E:toWorld(ang(-90+((cosr(curtime()*3)*5)*!(W|A|S|D))+clamp(-Evel:z()/MaxMove,-30,30),clamp(Evel:y()/MaxMove,-30,30),0)))
  875. Tail:unshiftAngle(holoEntity(UnShiftHoloGram):angles()+ang(0,0,0))
  876. for(O = 1,HoloGram){
  877. holoAng(O + UnShiftHoloGram - 1 , Tail[O,angle] ?: E:angles()+ang(0,0,0))
  878. holoAng(UnShiftHoloGram + 6 , Tail[O,angle]+ang(0,0,180) ?: E:angles()+ang(0,0,0))
  879. }
  880. Tail:remove(UnShiftHoloGram + 6)
  881. }
  882. }
  883. function angle headAngles(H){
  884. local AImA = (aimPosItions() - holoEntity(H):pos()):toAngle()
  885. return E:toWorld(clamp(E:toLocal(AImA+ang(0,0,0)),ang(-45,-100,-180),ang(45,100,180)))
  886. }
  887. function number valid(HoloN1,HoloN2){
  888. return holoEntity(HoloN1) & !holoEntity(HoloN2) & perf() & holoCanCreate()
  889. }
  890. function angle gunAngles(A){
  891. local Ayaw = (holoEntity(A):pos()-aimPosItions()):toAngle():yaw()
  892. return E:toWorld(ang(0,Ayaw-E:angles():yaw()+180,0))
  893. }
  894. function angle hipGunAngles(L){
  895. local Lpitch = (holoEntity(L):pos()-aimPosItions()):toAngle():pitch()
  896. return holoEntity(241):toWorld(ang(-Lpitch,0,0))
  897. }
  898. function setHoloAngles(){
  899. if(Driver:isValid()){
  900. holoAng(176,headAngles(176))
  901. }
  902. holoAng(178,holoEntity(176):mouthMovement(4))
  903. if(Driver:isValid() &int(Count / 20) & perf()){
  904. holoAng(241,gunAngles(241))
  905. holoAng(243,hipGunAngles(243))
  906. }
  907. }
  908.  
  909.  
  910. function toActivateFunctions(){
  911. if(int(Count/10)){
  912. grounds()
  913. animation()
  914. Seat:ifSeatIsValidEntity()
  915. animateFeet(MaxStepUp,StepLength)
  916. Seat:kick_the_bitch_out()
  917. #rangerPositions()
  918. tailAnim(158,1,15)
  919. setHoloAngles()
  920. }
  921. }
  922.  
  923.  
  924.  
  925.  
  926. Alpha = 0
  927. #holographic stuff#
  928. c(10000,E:toWorld(vec(0,0,0)),vec(2.5),E:toWorld(ang()),vec(random(255),random(255),random(255)),"hq_torus",None,245)
  929. holoMaterial(10000,"debug/debugdrawflat")
  930. c(1000,E:toWorld(vec(Front_Back,Right_Left+5,-Up_Down)),vec(1),E:toWorld(ang()),vec(255,60,0),"",None,Alpha)
  931. c(2000,E:toWorld(vec(Front_Back,-Right_Left-5,-Up_Down)),vec(1),E:toWorld(ang()),vec(255,60,0),"",None,Alpha)
  932. c(3000,E:toWorld(vec(-Front_Back,Right_Left+5,-Up_Down)),vec(1),E:toWorld(ang()),vec(255,60,0),"",None,Alpha)
  933. c(4000,E:toWorld(vec(-Front_Back,-Right_Left-5,-Up_Down)),vec(1),E:toWorld(ang()),vec(255,60,0),"",None,Alpha)
  934.  
  935. }
  936. if(!holoEntity(Last_one) & perf()){
  937. if(valid(4000,21)){
  938. c(1,E:toWorld(vec(Front_Back,Right_Left,0)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",E,Alpha)
  939. c(2,holoEntity(1):toWorld(vec(0,0,FrontLegLength1/2)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",holoEntity(1),Alpha)
  940. c(3,holoEntity(2):toWorld(vec(0,0,FrontLegLength2/2)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",holoEntity(2),Alpha)
  941.  
  942. c(4,E:toWorld(vec(Front_Back,-Right_Left,0)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",E,Alpha)
  943. c(5,holoEntity(4):toWorld(vec(0,0,FrontLegLength1/2)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",holoEntity(4),Alpha)
  944. c(6,holoEntity(5):toWorld(vec(0,0,FrontLegLength2/2)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",holoEntity(5),Alpha)
  945.  
  946. c(7,E:toWorld(vec(-Front_Back,Right_Left,0)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",E,Alpha)
  947. c(8,holoEntity(7):toWorld(vec(BackLegLength1,0,0)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",holoEntity(7),Alpha)
  948. c(9,holoEntity(8):toWorld(vec(0,0,-BackLegLength2)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",holoEntity(8),Alpha)
  949. c(10,holoEntity(9):toWorld(vec(0,0,BackLegLength3)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",holoEntity(9),Alpha)
  950.  
  951. c(11,E:toWorld(vec(-Front_Back,-Right_Left,0)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",E,Alpha)
  952. c(12,holoEntity(11):toWorld(vec(BackLegLength1,0,0)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",holoEntity(11),Alpha)
  953. c(13,holoEntity(12):toWorld(vec(0,0,-BackLegLength2)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",holoEntity(12),Alpha)
  954. c(14,holoEntity(13):toWorld(vec(0,0,BackLegLength3)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",holoEntity(13),Alpha)
  955.  
  956. ik(FrontLegLength1/2,FrontLegLength2/2,holoEntity(1):pos(),holoEntity(1000):pos(),1,2,E)
  957. ik(FrontLegLength1/2,FrontLegLength2/2,holoEntity(4):pos(),holoEntity(2000):pos(),4,5,E)
  958. kinemize(E,holoEntity(7),holoEntity(8),holoEntity(9),holoEntity(3000):pos(),BackLegLength1,BackLegLength2,BackLegLength3)
  959. kinemize(E,holoEntity(11),holoEntity(12),holoEntity(13),holoEntity(4000):pos(),BackLegLength1,BackLegLength2,BackLegLength3)
  960. angleFeet(35,62,99,135)
  961.  
  962. c(15,holoEntity(4):toWorld(vec(0,0,FrontLegLength1/4)),vec(1.5,2,4),holoEntity(4):toWorld(ang()),vec(255),"hq_rcube",holoEntity(4),255)
  963. c(16,holoEntity(5):toWorld(vec(0,0,FrontLegLength1/4)),vec(1.5,1.5,4),holoEntity(5):toWorld(ang()),vec(255),"hq_rcube",holoEntity(5),255)
  964. c(17,holoEntity(4):toWorld(vec(0,0,0)),vec(1.8,1.8,2.2),holoEntity(4):toWorld(ang(90,90,0)),vec(100),"hq_rcylinder",holoEntity(4),255)
  965. c(18,holoEntity(5):toWorld(vec(0,0,0)),vec(1.7,1.7,2.2),holoEntity(5):toWorld(ang(90,90,0)),vec(100),"hq_rcylinder",holoEntity(5),255)
  966. c(19,holoEntity(4):toWorld(vec(12,0,15)),vec(1.7,1.7,1.2),holoEntity(4):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(4),255)
  967. c(20,holoEntity(4):toWorld(vec(10,0,25)),vec(3,1.5,1.2),holoEntity(4):toWorld(ang(180,0,0)),vec(255),"hq_rcube",holoEntity(4),255)
  968. c(21,holoEntity(4):toWorld(vec(18,0,12)),vec(2.5,1.5,0.7),holoEntity(4):toWorld(ang(-45,0,0)),vec(255),"hq_rcube",holoEntity(4),255)
  969. }
  970. if(valid(21,41)){
  971. c(22,holoEntity(4):toWorld(vec(27,0,25)),vec(1.4,1.4,1.8),holoEntity(4):toWorld(ang(90,90,0)),vec(100),"hq_rcylinder",holoEntity(4),255)
  972. c(23,holoEntity(4):toWorld(vec(27,0,25)),vec(1.4,1.4,1.8),holoEntity(4):toWorld(ang(90,90,0)),vec(100),"hq_rcylinder",holoEntity(4),255)
  973. c(24,holoEntity(4):toWorld(vec(0,-5,FrontLegLength1/4)),vec(1.7,0.2,4),holoEntity(4):toWorld(ang()),vec(25),"hq_rcube",holoEntity(4),255)
  974. c(25,holoEntity(5):toWorld(vec(0,0,FrontLegLength1/4)),vec(1.7,0.2,4),holoEntity(5):toWorld(ang()),vec(25),"hq_rcube",holoEntity(5),255)
  975. c(26,holoEntity(4):toWorld(vec(27,0,25)),vec(1.6,1.6,0.2),holoEntity(4):toWorld(ang(90,90,0)),vec(5),"hq_rcylinder",holoEntity(4),255)
  976. c(27,holoEntity(4):toWorld(vec(27,5,25)),vec(1.6,1.6,0.2),holoEntity(4):toWorld(ang(90,90,0)),vec(5),"hq_rcylinder",holoEntity(4),255)
  977. c(28,holoEntity(4):toWorld(vec(27,-5,25)),vec(1.6,1.6,0.2),holoEntity(4):toWorld(ang(90,90,0)),vec(5),"hq_rcylinder",holoEntity(4),255)
  978. c(29,holoEntity(4):toWorld(vec(0,0,FrontLegLength1/6)),vec(1,2.1,1),holoEntity(4):toWorld(ang()),vec(155),"hq_rcube",holoEntity(4),255)
  979. c(30,holoEntity(4):toWorld(vec(0,0,FrontLegLength1/3)),vec(1,2.1,1),holoEntity(4):toWorld(ang()),vec(155),"hq_rcube",holoEntity(4),255)
  980. c(31,holoEntity(4):toWorld(vec(0,5,0)),vec(1.9,1.9,0.2),holoEntity(4):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(4),255)
  981. c(32,holoEntity(4):toWorld(vec(0,-5,0)),vec(1.9,1.9,0.2),holoEntity(4):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(4),255)
  982. c(33,holoEntity(5):toWorld(vec(0,0,FrontLegLength1/4)),vec(1,1.6,3),holoEntity(5):toWorld(ang()),vec(155),"hq_rcube",holoEntity(5),255)
  983. c(34,holoEntity(5):toWorld(vec(0,0,FrontLegLength1/4)),vec(1,1.6,3),holoEntity(5):toWorld(ang()),vec(155),"hq_rcube",holoEntity(5),255)
  984. c(35,holoEntity(6):toWorld(vec(0,0,0)),vec(1),holoEntity(6):toWorld(ang(0,0,0)),vec(100),"",holoEntity(6),255)
  985. c(36,holoEntity(35):toWorld(vec(0,0,0)),vec(1.5,1.5,1.8),holoEntity(35):toWorld(ang(90,90,0)),vec(100),"hq_rcylinder",holoEntity(35),255)
  986. c(37,holoEntity(36):toWorld(vec(0,-6,0)),vec(1.5,1.3,1),holoEntity(35):toWorld(ang(0,0,0)),vec(200),"hq_rcube",holoEntity(36),255)
  987. c(38,holoEntity(37):toWorld(vec(12,-0,0)),vec(1.7,0.5,0.9),holoEntity(37):toWorld(ang(0,0,0)),vec(200),"pyramid",holoEntity(37),255)
  988. c(39,holoEntity(37):toWorld(vec(10,-6,0)),vec(1.7,0.5,0.9),holoEntity(37):toWorld(ang(0,-15,0)),vec(200),"pyramid",holoEntity(37),255)
  989. c(40,holoEntity(37):toWorld(vec(10,6,0)),vec(1.7,0.5,0.9),holoEntity(37):toWorld(ang(0,15,0)),vec(200),"pyramid",holoEntity(37),255)
  990. c(41,holoEntity(4):toWorld(vec(0,5,FrontLegLength1/4)),vec(1.7,0.2,4),holoEntity(4):toWorld(ang()),vec(25),"hq_rcube",holoEntity(4),255)
  991. }
  992. if(valid(41,56)){
  993. c(42,holoEntity(1):toWorld(vec(0,0,FrontLegLength1/4)),vec(1.5,2,4),holoEntity(1):toWorld(ang()),vec(255),"hq_rcube",holoEntity(1),255)
  994. c(43,holoEntity(2):toWorld(vec(0,0,FrontLegLength1/4)),vec(1.5,1.5,4),holoEntity(2):toWorld(ang()),vec(255),"hq_rcube",holoEntity(2),255)
  995. c(44,holoEntity(1):toWorld(vec(0,0,0)),vec(1.8,1.8,2.2),holoEntity(1):toWorld(ang(90,90,0)),vec(100),"hq_rcylinder",holoEntity(1),255)
  996. c(45,holoEntity(2):toWorld(vec(0,0,0)),vec(1.7,1.7,2.2),holoEntity(2):toWorld(ang(90,90,0)),vec(100),"hq_rcylinder",holoEntity(2),255)
  997. c(46,holoEntity(1):toWorld(vec(12,0,15)),vec(1.7,1.7,1.2),holoEntity(1):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(1),255)
  998. c(47,holoEntity(1):toWorld(vec(10,0,25)),vec(3,1.5,1.2),holoEntity(1):toWorld(ang(180,0,0)),vec(255),"hq_rcube",holoEntity(1),255)
  999. c(48,holoEntity(1):toWorld(vec(18,0,12)),vec(2.5,1.5,0.7),holoEntity(1):toWorld(ang(-45,0,0)),vec(255),"hq_rcube",holoEntity(1),255)
  1000. c(49,holoEntity(1):toWorld(vec(27,0,25)),vec(1.4,1.4,1.8),holoEntity(1):toWorld(ang(90,90,0)),vec(100),"hq_rcylinder",holoEntity(1),255)
  1001. c(50,holoEntity(1):toWorld(vec(27,0,25)),vec(1.4,1.4,1.8),holoEntity(1):toWorld(ang(90,90,0)),vec(100),"hq_rcylinder",holoEntity(1),255)
  1002. c(51,holoEntity(1):toWorld(vec(0,-5,FrontLegLength1/4)),vec(1.7,0.2,4),holoEntity(1):toWorld(ang()),vec(25),"hq_rcube",holoEntity(1),255)
  1003. c(52,holoEntity(2):toWorld(vec(0,0,FrontLegLength1/4)),vec(1.7,0.2,4),holoEntity(2):toWorld(ang()),vec(25),"hq_rcube",holoEntity(2),255)
  1004. c(53,holoEntity(1):toWorld(vec(27,0,25)),vec(1.6,1.6,0.2),holoEntity(1):toWorld(ang(90,90,0)),vec(5),"hq_rcylinder",holoEntity(1),255)
  1005. c(54,holoEntity(1):toWorld(vec(27,5,25)),vec(1.6,1.6,0.2),holoEntity(1):toWorld(ang(90,90,0)),vec(5),"hq_rcylinder",holoEntity(1),255)
  1006. c(55,holoEntity(1):toWorld(vec(27,-5,25)),vec(1.6,1.6,0.2),holoEntity(1):toWorld(ang(90,90,0)),vec(5),"hq_rcylinder",holoEntity(1),255)
  1007. c(56,holoEntity(1):toWorld(vec(0,0,FrontLegLength1/6)),vec(1,2.1,1),holoEntity(1):toWorld(ang()),vec(155),"hq_rcube",holoEntity(1),255)
  1008. }
  1009. if(valid(56,68)){
  1010. c(57,holoEntity(1):toWorld(vec(0,0,FrontLegLength1/3)),vec(1,2.1,1),holoEntity(1):toWorld(ang()),vec(155),"hq_rcube",holoEntity(1),255)
  1011. c(58,holoEntity(1):toWorld(vec(0,5,0)),vec(1.9,1.9,0.2),holoEntity(1):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(1),255)
  1012. c(59,holoEntity(1):toWorld(vec(0,-5,0)),vec(1.9,1.9,0.2),holoEntity(1):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(1),255)
  1013. c(60,holoEntity(2):toWorld(vec(0,0,FrontLegLength1/4)),vec(1,1.6,3),holoEntity(2):toWorld(ang()),vec(155),"hq_rcube",holoEntity(2),255)
  1014. c(61,holoEntity(2):toWorld(vec(0,0,FrontLegLength1/4)),vec(1,1.6,3),holoEntity(2):toWorld(ang()),vec(155),"hq_rcube",holoEntity(2),255)
  1015. c(62,holoEntity(3):toWorld(vec(0,0,0)),vec(1),holoEntity(6):toWorld(ang(0,0,0)),vec(100),"",holoEntity(3),255)
  1016. c(63,holoEntity(62):toWorld(vec(0,0,0)),vec(1.5,1.5,1.8),holoEntity(62):toWorld(ang(90,90,0)),vec(100),"hq_rcylinder",holoEntity(62),255)
  1017. c(64,holoEntity(63):toWorld(vec(0,-6,0)),vec(1.5,1.3,1),holoEntity(62):toWorld(ang(0,0,0)),vec(200),"hq_rcube",holoEntity(62),255)
  1018. c(65,holoEntity(64):toWorld(vec(12,-0,0)),vec(1.7,0.5,0.9),holoEntity(64):toWorld(ang(0,0,0)),vec(200),"pyramid",holoEntity(64),255)
  1019. c(66,holoEntity(64):toWorld(vec(10,-6,0)),vec(1.7,0.5,0.9),holoEntity(64):toWorld(ang(0,-15,0)),vec(200),"pyramid",holoEntity(64),255)
  1020. c(67,holoEntity(64):toWorld(vec(10,6,0)),vec(1.7,0.5,0.9),holoEntity(64):toWorld(ang(0,15,0)),vec(200),"pyramid",holoEntity(64),255)
  1021. c(68,holoEntity(1):toWorld(vec(0,5,FrontLegLength1/4)),vec(1.7,0.2,4),holoEntity(1):toWorld(ang()),vec(25),"hq_rcube",holoEntity(1),255)
  1022. }
  1023. #########
  1024. #back legs#
  1025. #first one#
  1026. if(valid(68,71)){
  1027. c(69,holoEntity(7):toWorld(vec(BackLegLength1/2,0,0)),vec(2,2.3,4),holoEntity(7):toWorld(ang(90,0,0)),vec(255),"hq_rcube",holoEntity(7),255)
  1028. c(70,holoEntity(8):toWorld(vec(0,0,-BackLegLength2/2)),vec(1.8,2,3),holoEntity(8):toWorld(ang(0,0,0)),vec(255),"hq_rcube",holoEntity(8),255)
  1029. c(71,holoEntity(9):toWorld(vec(0,0,BackLegLength3/2)),vec(1.5,1.5,2),holoEntity(9):toWorld(ang(0,0,0)),vec(255),"hq_rcube",holoEntity(9),255)
  1030. }
  1031. if(valid(71,74)){
  1032. c(72,holoEntity(7):toWorld(vec(0,0,0)),vec(2.3,2.3,2.5),holoEntity(7):toWorld(ang(90,90,0)),vec(100),"hq_rcylinder",holoEntity(7),255)
  1033. c(73,holoEntity(8):toWorld(vec(0,0,0)),vec(2,2,2.5),holoEntity(8):toWorld(ang(90,90,0)),vec(100),"hq_rcylinder",holoEntity(8),255)
  1034. c(74,holoEntity(9):toWorld(vec(0,0,0)),vec(1.5,1.5,2.2),holoEntity(9):toWorld(ang(90,90,0)),vec(100),"hq_rcylinder",holoEntity(9),255)
  1035. }
  1036. if(valid(74,81)){
  1037. c(75,holoEntity(7):toWorld(vec(0,0,20)),vec(1,1.5,2.4),holoEntity(7):toWorld(ang(0,0,0)),vec(255),"hq_rcube",holoEntity(7),255)
  1038. c(76,holoEntity(7):toWorld(vec(20,0,20)),vec(1.2,1.5,3.5),holoEntity(7):toWorld(ang(-35,0,0)),vec(255),"hq_rcube",holoEntity(7),255)
  1039. c(77,holoEntity(7):toWorld(vec(5,0,35)),vec(1.8,1.8,2),holoEntity(7):toWorld(ang(90,90,0)),vec(100),"hq_rcylinder",holoEntity(7),255)
  1040. c(78,holoEntity(7):toWorld(vec(10,0,20)),vec(1.8,1.8,1.2),holoEntity(7):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(7),255)
  1041. c(79,holoEntity(7):toWorld(vec(5,0,35)),vec(2,2,0.2),holoEntity(7):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(7),255)
  1042. c(80,holoEntity(7):toWorld(vec(5,5,35)),vec(2,2,0.2),holoEntity(7):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(7),255)
  1043. c(81,holoEntity(7):toWorld(vec(5,-5,35)),vec(2,2,0.2),holoEntity(7):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(7),255)
  1044. }
  1045. if(valid(81,87)){
  1046. c(82,holoEntity(7):toWorld(vec(0,5,0)),vec(2.5,2.5,0.2),holoEntity(7):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(7),255)
  1047. c(83,holoEntity(7):toWorld(vec(0,-5,0)),vec(2.5,2.5,0.2),holoEntity(7):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(7),255)
  1048. c(84,holoEntity(8):toWorld(vec(0,5,0)),vec(2.2,2.2,0.2),holoEntity(8):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(8),255)
  1049. c(85,holoEntity(8):toWorld(vec(0,-5,0)),vec(2.2,2.2,0.2),holoEntity(8):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(8),255)
  1050. c(86,holoEntity(9):toWorld(vec(0,5,0)),vec(1.7,1.7,0.2),holoEntity(9):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(9),255)
  1051. c(87,holoEntity(9):toWorld(vec(0,-5,0)),vec(1.7,1.7,0.2),holoEntity(9):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(9),255)
  1052. }
  1053. if(valid(87,89)){
  1054. c(88,holoEntity(7):toWorld(vec(BackLegLength1/2,5,0)),vec(2.2,0.2,4.2),holoEntity(7):toWorld(ang(90,0,0)),vec(10),"hq_rcube",holoEntity(7),255)
  1055. c(89,holoEntity(7):toWorld(vec(BackLegLength1/2,-5,0)),vec(2.2,0.2,4.2),holoEntity(7):toWorld(ang(90,0,0)),vec(10),"hq_rcube",holoEntity(7),255)
  1056. }
  1057. if(valid(89,93)){
  1058. c(90,holoEntity(8):toWorld(vec(0,5,-BackLegLength2/2)),vec(2,0.2,3.2),holoEntity(8):toWorld(ang(0,0,0)),vec(10),"hq_rcube",holoEntity(8),255)
  1059. c(91,holoEntity(8):toWorld(vec(0,-5,-BackLegLength2/2)),vec(2,0.2,3.2),holoEntity(8):toWorld(ang(0,0,0)),vec(10),"hq_rcube",holoEntity(8),255)
  1060. c(92,holoEntity(9):toWorld(vec(0,0,BackLegLength3/2)),vec(1.7,0.2,2.2),holoEntity(9):toWorld(ang(0,0,0)),vec(10),"hq_rcube",holoEntity(9),255)
  1061. c(93,holoEntity(9):toWorld(vec(0,0,BackLegLength3/2)),vec(1.7,0.2,2.2),holoEntity(9):toWorld(ang(0,0,0)),vec(10),"hq_rcube",holoEntity(9),255)
  1062. }
  1063. if(valid(93,96)){
  1064. c(94,holoEntity(7):toWorld(vec(0,0,0)),vec(2.5,2.5,0.2),holoEntity(7):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(7),255)
  1065. c(95,holoEntity(8):toWorld(vec(0,0,0)),vec(2.2,2.2,0.2),holoEntity(8):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(8),255)
  1066. c(96,holoEntity(9):toWorld(vec(0,0,0)),vec(1.7,1.7,0.2),holoEntity(9):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(9),255)
  1067. }
  1068. if(valid(96,104)){
  1069. c(97,holoEntity(7):toWorld(vec(BackLegLength1/2,0,0)),vec(1,2.5,1.5),holoEntity(7):toWorld(ang(90,0,0)),vec(100),"hq_rcube",holoEntity(7),255)
  1070. c(98,holoEntity(8):toWorld(vec(0,0,-BackLegLength2/1.8)),vec(1,2.2,1),holoEntity(8):toWorld(ang(90,0,0)),vec(100),"hq_rcube",holoEntity(8),255)
  1071. c(99,holoEntity(10):toWorld(vec(0,0,0)),vec(1),holoEntity(10):toWorld(ang(0,0,0)),vec(10),"",holoEntity(10),255)
  1072. c(100,holoEntity(99):toWorld(vec(0,0,0)),vec(1.5,1.5,1.5),holoEntity(99):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(99),255)
  1073. c(101,holoEntity(99):toWorld(vec(10,0,-0)),vec(0.8,1.3,1.2),holoEntity(99):toWorld(ang(90,90,0)),vec(255),"hq_rcube",holoEntity(99),255)
  1074. c(102,holoEntity(99):toWorld(vec(17,-0,0)),vec(1.7,0.5,0.9),holoEntity(99):toWorld(ang(0,0,0)),vec(200),"pyramid",holoEntity(101),255)
  1075. c(103,holoEntity(99):toWorld(vec(17,-6,0)),vec(1.7,0.5,0.9),holoEntity(99):toWorld(ang(0,-15,0)),vec(200),"pyramid",holoEntity(101),255)
  1076. c(104,holoEntity(99):toWorld(vec(17,6,0)),vec(1.7,0.5,0.9),holoEntity(99):toWorld(ang(0,15,0)),vec(200),"pyramid",holoEntity(101),255)
  1077. }
  1078. ############
  1079. #second back leg#
  1080.  
  1081. if(valid(104,110)){
  1082. c(105,holoEntity(11):toWorld(vec(BackLegLength1/2,0,0)),vec(2,2.3,4),holoEntity(11):toWorld(ang(90,0,0)),vec(255),"hq_rcube",holoEntity(11),255)
  1083. c(106,holoEntity(12):toWorld(vec(0,0,-BackLegLength2/2)),vec(1.8,2,3),holoEntity(12):toWorld(ang(0,0,0)),vec(255),"hq_rcube",holoEntity(12),255)
  1084. c(107,holoEntity(13):toWorld(vec(0,0,BackLegLength3/2)),vec(1.5,1.5,2),holoEntity(13):toWorld(ang(0,0,0)),vec(255),"hq_rcube",holoEntity(13),255)
  1085. c(108,holoEntity(11):toWorld(vec(0,0,0)),vec(2.3,2.3,2.5),holoEntity(11):toWorld(ang(90,90,0)),vec(100),"hq_rcylinder",holoEntity(11),255)
  1086. c(109,holoEntity(12):toWorld(vec(0,0,0)),vec(2,2,2.5),holoEntity(12):toWorld(ang(90,90,0)),vec(100),"hq_rcylinder",holoEntity(12),255)
  1087. c(110,holoEntity(13):toWorld(vec(0,0,0)),vec(1.5,1.5,2.2),holoEntity(13):toWorld(ang(90,90,0)),vec(100),"hq_rcylinder",holoEntity(13),255)
  1088. }
  1089. if(valid(110,117)){
  1090. c(111,holoEntity(11):toWorld(vec(0,0,20)),vec(1,1.5,2.4),holoEntity(11):toWorld(ang(0,0,0)),vec(255),"hq_rcube",holoEntity(11),255)
  1091. c(112,holoEntity(11):toWorld(vec(20,0,20)),vec(1.2,1.5,3.5),holoEntity(11):toWorld(ang(-35,0,0)),vec(255),"hq_rcube",holoEntity(11),255)
  1092. c(113,holoEntity(11):toWorld(vec(5,0,35)),vec(1.8,1.8,2),holoEntity(11):toWorld(ang(90,90,0)),vec(100),"hq_rcylinder",holoEntity(11),255)
  1093. c(114,holoEntity(11):toWorld(vec(10,0,20)),vec(1.8,1.8,1.2),holoEntity(11):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(11),255)
  1094. c(115,holoEntity(11):toWorld(vec(5,0,35)),vec(2,2,0.2),holoEntity(11):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(11),255)
  1095. c(116,holoEntity(11):toWorld(vec(5,5,35)),vec(2,2,0.2),holoEntity(11):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(11),255)
  1096. c(117,holoEntity(11):toWorld(vec(5,-5,35)),vec(2,2,0.2),holoEntity(11):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(11),255)
  1097. }
  1098. if(valid(117,122)){
  1099. c(118,holoEntity(11):toWorld(vec(0,5,0)),vec(2.5,2.5,0.2),holoEntity(11):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(11),255)
  1100. c(119,holoEntity(11):toWorld(vec(0,-5,0)),vec(2.5,2.5,0.2),holoEntity(11):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(11),255)
  1101. c(120,holoEntity(12):toWorld(vec(0,5,0)),vec(2.2,2.2,0.2),holoEntity(12):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(12),255)
  1102. c(121,holoEntity(12):toWorld(vec(0,-5,0)),vec(2.2,2.2,0.2),holoEntity(12):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(12),255)
  1103. c(122,holoEntity(13):toWorld(vec(0,5,0)),vec(1.7,1.7,0.2),holoEntity(13):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(13),255)
  1104. }
  1105. if(valid(122,129)){
  1106. c(123,holoEntity(13):toWorld(vec(0,-5,0)),vec(1.7,1.7,0.2),holoEntity(13):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(13),255)
  1107. c(124,holoEntity(11):toWorld(vec(BackLegLength1/2,5,0)),vec(2.2,0.2,4.2),holoEntity(11):toWorld(ang(90,0,0)),vec(10),"hq_rcube",holoEntity(11),255)
  1108. c(125,holoEntity(11):toWorld(vec(BackLegLength1/2,-5,0)),vec(2.2,0.2,4.2),holoEntity(11):toWorld(ang(90,0,0)),vec(10),"hq_rcube",holoEntity(11),255)
  1109. c(126,holoEntity(12):toWorld(vec(0,5,-BackLegLength2/2)),vec(2,0.2,3.2),holoEntity(12):toWorld(ang(0,0,0)),vec(10),"hq_rcube",holoEntity(12),255)
  1110. c(127,holoEntity(12):toWorld(vec(0,-5,-BackLegLength2/2)),vec(2,0.2,3.2),holoEntity(12):toWorld(ang(0,0,0)),vec(10),"hq_rcube",holoEntity(12),255)
  1111. c(128,holoEntity(13):toWorld(vec(0,0,BackLegLength3/2)),vec(1.7,0.2,2.2),holoEntity(13):toWorld(ang(0,0,0)),vec(10),"hq_rcube",holoEntity(13),255)
  1112. c(129,holoEntity(13):toWorld(vec(0,0,BackLegLength3/2)),vec(1.7,0.2,2.2),holoEntity(13):toWorld(ang(0,0,0)),vec(10),"hq_rcube",holoEntity(13),255)
  1113. }
  1114. if(valid(129,132)){
  1115. c(130,holoEntity(11):toWorld(vec(0,0,0)),vec(2.5,2.5,0.2),holoEntity(11):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(11),255)
  1116. c(131,holoEntity(12):toWorld(vec(0,0,0)),vec(2.2,2.2,0.2),holoEntity(12):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(12),255)
  1117. c(132,holoEntity(13):toWorld(vec(0,0,0)),vec(1.7,1.7,0.2),holoEntity(13):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(13),255)
  1118. }
  1119. if(valid(132,140)){
  1120. c(133,holoEntity(11):toWorld(vec(BackLegLength1/2,0,0)),vec(1,2.5,1.5),holoEntity(11):toWorld(ang(90,0,0)),vec(100),"hq_rcube",holoEntity(11),255)
  1121. c(134,holoEntity(12):toWorld(vec(0,0,-BackLegLength2/1.8)),vec(1,2.2,1),holoEntity(12):toWorld(ang(90,0,0)),vec(100),"hq_rcube",holoEntity(12),255)
  1122. c(135,holoEntity(14):toWorld(vec(0,0,0)),vec(1),holoEntity(14):toWorld(ang(0,0,0)),vec(14),"",holoEntity(14),255)
  1123. c(136,holoEntity(135):toWorld(vec(0,0,0)),vec(1.5,1.5,1.5),holoEntity(135):toWorld(ang(90,90,0)),vec(10),"hq_rcylinder",holoEntity(135),255)
  1124. c(137,holoEntity(135):toWorld(vec(10,0,-0)),vec(0.8,1.3,1.2),holoEntity(135):toWorld(ang(90,90,0)),vec(255),"hq_rcube",holoEntity(135),255)
  1125. c(138,holoEntity(135):toWorld(vec(17,-0,0)),vec(1.7,0.5,0.9),holoEntity(135):toWorld(ang(0,0,0)),vec(200),"pyramid",holoEntity(137),255)
  1126. c(139,holoEntity(135):toWorld(vec(17,-6,0)),vec(1.7,0.5,0.9),holoEntity(135):toWorld(ang(0,-15,0)),vec(200),"pyramid",holoEntity(137),255)
  1127. c(140,holoEntity(135):toWorld(vec(17,6,0)),vec(1.7,0.5,0.9),holoEntity(135):toWorld(ang(0,15,0)),vec(200),"pyramid",holoEntity(137),255)
  1128. }
  1129. if(valid(140,148)){
  1130. c(141,E:toWorld(vec(30,0,0)),vec(2,3,2.5),E:toWorld(ang(0,0,0)),vec(200),"hq_rcube",E,255)
  1131. c(142,E:toWorld(vec(60,0,0)),vec(2,3,2.5),E:toWorld(ang(0,0,0)),vec(200),"hq_rcube",E,255)
  1132. c(143,E:toWorld(vec(40,0,0)),vec(2,2.5,1.5),E:toWorld(ang(0,0,0)),vec(20),"hq_rcube",E,255)
  1133. c(144,E:toWorld(vec(10,0,0)),vec(4,2,1.5),E:toWorld(ang(0,0,0)),vec(20),"hq_rcube",E,255)
  1134. c(145,E:toWorld(vec(-20,0,0)),vec(2,3,2),E:toWorld(ang(0,0,0)),vec(200),"hq_rcube",E,255)
  1135. c(146,E:toWorld(vec(-30,0,0)),vec(4,2,1.5),E:toWorld(ang(0,0,0)),vec(20),"hq_rcube",E,255)
  1136. c(147,E:toWorld(vec(-50,0,0)),vec(2,3,2),E:toWorld(ang(0,0,0)),vec(200),"hq_rcube",E,255)
  1137. c(148,E:toWorld(vec(5,0,0)),vec(0.2,2.5,2),E:toWorld(ang(0,0,0)),vec(100),"hq_rcube",E,255)
  1138. }
  1139. if(valid(148,158)){
  1140. c(149,E:toWorld(vec(0,0,0)),vec(0.2,2.5,2),E:toWorld(ang(0,0,0)),vec(100),"hq_rcube",E,255)
  1141. c(150,E:toWorld(vec(-5,0,0)),vec(0.2,2.5,2),E:toWorld(ang(0,0,0)),vec(100),"hq_rcube",E,255)
  1142. c(151,E:toWorld(vec(10,0,0)),vec(0.2,2.5,2),E:toWorld(ang(0,0,0)),vec(100),"hq_rcube",E,255)
  1143. c(152,E:toWorld(vec(15,0,0)),vec(0.2,2.5,2),E:toWorld(ang(0,0,0)),vec(100),"hq_rcube",E,255)
  1144. c(153,E:toWorld(vec(-50,0,0)),vec(1.3,2.3,2.1),E:toWorld(ang(0,0,0)),vec(100),"hq_rcube",E,255)
  1145. c(154,E:toWorld(vec(-20,0,0)),vec(1.3,2.3,2.1),E:toWorld(ang(0,0,0)),vec(100),"hq_rcube",E,255)
  1146. c(155,E:toWorld(vec(-50,0,0)),vec(1.3,2.3,2.1),E:toWorld(ang(90,0,0)),vec(100),"hq_rcube",E,255)
  1147. c(156,E:toWorld(vec(60,0,0)),vec(2,3,2.5),E:toWorld(ang(0,0,0)),vec(200),"hq_rcube",E,255)
  1148. c(157,E:toWorld(vec(40,0,0)),vec(2,2.5,1.5),E:toWorld(ang(0,0,0)),vec(20),"hq_rcube",E,255)
  1149. c(158,E:toWorld(vec(-60,0,4)),vec(1.5,1.5,1.5),E:toWorld(ang(0,0,0)),vec(20),"hq_rcube",E,255)
  1150. }
  1151.  
  1152. #tail#
  1153. if(valid(158,164)){
  1154. holoEntity(158):generateTail(0,22,157,6)
  1155. }
  1156. #####
  1157. if(valid(164,169)){
  1158. c(165,E:toWorld(vec(70,0,0)),vec(2,2,2.5),E:toWorld(ang(90,90,0)),vec(100),"hq_rcylinder",E,255)
  1159. c(166,E:toWorld(vec(70,12.5,0)),vec(2,2,0.2),E:toWorld(ang(90,90,0)),vec(50),"hq_rcylinder",E,255)
  1160. c(167,E:toWorld(vec(70,-12.5,0)),vec(2,2,0.2),E:toWorld(ang(90,90,0)),vec(50),"hq_rcylinder",E,255)
  1161. c(168,E:toWorld(vec(60,0,0)),vec(1.5,2.5,2.6),E:toWorld(ang(0,0,0)),vec(100),"hq_rcube",E,255)
  1162. c(169,E:toWorld(vec(30,0,0)),vec(1.5,2.5,2.6),E:toWorld(ang(0,0,0)),vec(100),"hq_rcube",E,255)
  1163. }
  1164. if(valid(169,182)){
  1165. c(170,E:toWorld(vec(82,5,10)),vec(1,1,2),E:toWorld(ang(50,-30,0)),vec(100),"hq_rcylinder",E,255)
  1166. c(171,E:toWorld(vec(82,-5,10)),vec(1,1,2),E:toWorld(ang(50,30,0)),vec(100),"hq_rcylinder",E,255)
  1167. c(172,holoEntity(170):toWorld(vec(0,0,5)),vec(1.1,1.1,0.2),holoEntity(170):toWorld(ang(0,-0,0)),vec(50),"hq_rcylinder",holoEntity(170),255)
  1168. c(173,holoEntity(170):toWorld(vec(0,-0,-5)),vec(1.1,1.1,0.2),holoEntity(170):toWorld(ang(0,0,0)),vec(50),"hq_rcylinder",holoEntity(170),255)
  1169. c(174,holoEntity(171):toWorld(vec(0,0,5)),vec(1.1,1.1,0.2),holoEntity(171):toWorld(ang(0,-0,0)),vec(50),"hq_rcylinder",holoEntity(171),255)
  1170. c(175,holoEntity(171):toWorld(vec(0,-0,-5)),vec(1.1,1.1,0.2),holoEntity(171):toWorld(ang(0,0,0)),vec(50),"hq_rcylinder",holoEntity(171),255)
  1171. c(176,E:toWorld(vec(93,-0,22)),vec(2.2),E:toWorld(ang(0,0,0)),vec(80),"hqsphere",E,255)
  1172.  
  1173. c(177,holoEntity(176):toWorld(vec(17,-0,4)),vec(1.7,0.9,0.4),holoEntity(176):toWorld(ang(0,0,0)),vec(80),"hq_rcube",holoEntity(176),255)
  1174. c(178,holoEntity(176):toWorld(vec(0,-0,-4)),vec(0.5),holoEntity(176):toWorld(ang(0,0,0)),vec(255),"hq_rcube",holoEntity(176),255)
  1175. c(179,holoEntity(176):toWorld(vec(17,-0,-4)),vec(1.7,0.9,0.4),holoEntity(176):toWorld(ang(0,0,0)),vec(80),"hq_rcube",holoEntity(178),255)
  1176.  
  1177. c(180,holoEntity(176):toWorld(vec(17,-0,5)),vec(1.6,0.8,0.4),holoEntity(176):toWorld(ang(0,0,0)),vec(10),"hq_rcube",holoEntity(176),255)
  1178. c(182,holoEntity(176):toWorld(vec(17,-0,-5)),vec(1.6,0.8,0.4),holoEntity(176):toWorld(ang(0,0,0)),vec(10),"hq_rcube",holoEntity(178),255)
  1179. }
  1180. #teeth#
  1181. if(valid(182,189)){
  1182. for(H1 = 1,7){
  1183. c(182+H1,holoEntity(177):toWorld(vec(-5+H1 * 1.85,4,-3)),vec(0.2,0.2,!holoEntity(188) ? 0.3 : 0.5),holoEntity(177):toWorld(ang(0,0,-180)),vec(15),"pyramid",holoEntity(177),255)
  1184. }
  1185. }
  1186. if(valid(189,196)){
  1187. for(H2 = 1,7){
  1188. c(189+H2,holoEntity(177):toWorld(vec(-5+H2 * 1.85,-4,-3)),vec(0.2,0.2,!holoEntity(195) ? 0.3 : 0.5),holoEntity(177):toWorld(ang(0,0,-180)),vec(15),"pyramid",holoEntity(177),255)
  1189. }
  1190. }
  1191.  
  1192. if(valid(196,203)){
  1193. for(H3 = 1,8){
  1194. c(196+H3,holoEntity(179):toWorld(vec(-7.7+H3 * 1.85,4,3)),vec(0.2,0.2,!holoEntity(203) ? 0.3 : 0.5),holoEntity(179):toWorld(ang(0,0,0)),vec(15),"pyramid",holoEntity(179),255)
  1195. }
  1196. }
  1197. if(valid(203,212)){
  1198. for(H4 = 1,8){
  1199. c(204+H4,holoEntity(179):toWorld(vec(-7.7+H4 * 1.85,-4,3)),vec(0.2,0.2,!holoEntity(210) ? 0.3 : 0.5),holoEntity(179):toWorld(ang(0,0,0)),vec(15),"pyramid",holoEntity(179),255)
  1200. }
  1201. }
  1202. if(valid(212,216)){
  1203. for(H5 = 1,4){
  1204. c(212+H5,holoEntity(177):toWorld(vec(9,-4.5+H5*1.85,-3)),vec(0.2,0.2,0.3),holoEntity(177):toWorld(ang(0,0,180)),vec(15),"pyramid",holoEntity(177),255)
  1205. }
  1206. }
  1207. if(valid(216,220)){
  1208. for(H6 = 1,4){
  1209. c(216+H6,holoEntity(179):toWorld(vec(9,-4.5+H6*1.85,3)),vec(0.2,0.2,0.3),holoEntity(179):toWorld(ang(0,0,0)),vec(15),"pyramid",holoEntity(179),255)
  1210. }
  1211. }
  1212. if(valid(220,226)){
  1213. c(221,holoEntity(176):toWorld(vec(-6,7.5,13)),vec(0.5,0.6,1.5),holoEntity(176):toWorld(ang(-45,-25,10)),vec(85),"hq_rcube",holoEntity(176),255)
  1214. c(222,holoEntity(176):toWorld(vec(-6,-7.5,13)),vec(0.5,0.6,1.5),holoEntity(176):toWorld(ang(-45,25,-10)),vec(85),"hq_rcube",holoEntity(176),255)
  1215. c(223,holoEntity(176):toWorld(vec(-6,7.5,13)),vec(0.6,0.4,1.3),holoEntity(176):toWorld(ang(-45,-25,10)),vec(0,0,0),"hq_rcube",holoEntity(176),255)
  1216. c(224,holoEntity(176):toWorld(vec(-6,-7.5,13)),vec(0.6,0.4,1.3),holoEntity(176):toWorld(ang(-45,25,-10)),vec(0,0,0),"hq_rcube",holoEntity(176),255)
  1217. c(225,holoEntity(176):toWorld(vec(5.5,8.2,8)),vec(0.35,0.40,0.45),holoEntity(176):toWorld(ang(90,2,28)),vec(255,0,0),"tetra",holoEntity(176),255)
  1218. c(226,holoEntity(176):toWorld(vec(5.5,-8.2,8)),vec(0.35,0.40,0.45),holoEntity(176):toWorld(ang(90,-2,-28)),vec(255,0,0),"tetra",holoEntity(176),255)
  1219.  
  1220. }
  1221. #sexy tail parts#
  1222. #part1#
  1223. if(valid(226,232)){
  1224. for(T1 = 1,6){
  1225. c(226+T1,holoEntity(157+T1):toWorld(vec(0,0,11-T1/8)),vec((1.8-0.8)-T1/10,(1.8-0.8)-T1/8,2-T1/10),holoEntity(157+T1):toWorld(ang(0,0,0)),vec(255),"hq_rcylinder",holoEntity(157+T1),255)
  1226. }
  1227. }
  1228. ######
  1229.  
  1230. #part2#
  1231. if(valid(232,238)){
  1232. for(T2 = 1,6){
  1233. c(232+T2,holoEntity(157+T2):toWorld(vec(6-T2/8,0,14-T2/10)),vec(0.75-T2/12,0.7-T2/10,1.5-T2/12),holoEntity(157+T2):toWorld(ang(45,0,0)),vec(5),"pyramid",holoEntity(157+T2),255)
  1234. }
  1235. }
  1236.  
  1237. #######
  1238. ################
  1239. }
  1240. ##########
  1241. ###############
  1242. ###############
  1243. #activates everything / sets the material
  1244. Last_one = 238
  1245. if(!holoEntity(Last_one) & !E:isFrozen()){
  1246. E:propFreeze(1)
  1247. }
  1248. if(changed(holoEntity(Last_one))){
  1249. timer("check",100)
  1250. E:setAlpha(0)
  1251. E:propFreeze(0)
  1252. materialset()
  1253. }
  1254. if(clk("check")){
  1255. On = 1
  1256. timer("check2",200)
  1257. stoptimer("check")
  1258. }
  1259. if(clk("check2")){
  1260. holoMaterial(225,"debug/debugdrawflat")
  1261. holoMaterial(226,"debug/debugdrawflat")
  1262. stoptimer("check2")
  1263. }
  1264. if(On&perf()&int(Count/10)){
  1265. toActivateFunctions()
  1266. if(!Run){
  1267. makeItdoSounds("npc/dog/dog_footstep"+randint(1,4)+".wav")
  1268. }
  1269. if(JumpActive==1){
  1270. jumpAnim()
  1271. }
  1272. if(int(Count/10)){
  1273. ik(FrontLegLength1/2,FrontLegLength2/2,holoEntity(1):pos(),holoEntity(1000):pos(),1,2,E)
  1274. ik(FrontLegLength1/2,FrontLegLength2/2,holoEntity(4):pos(),holoEntity(2000):pos(),4,5,E)
  1275. kinemize(E,holoEntity(7),holoEntity(8),holoEntity(9),holoEntity(3000):pos(),BackLegLength1,BackLegLength2,BackLegLength3)
  1276. kinemize(E,holoEntity(11),holoEntity(12),holoEntity(13),holoEntity(4000):pos(),BackLegLength1,BackLegLength2,BackLegLength3)
  1277. }
  1278. angleFeet(35,62,99,135)
  1279. }
  1280. ##########################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement