Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ######################
- #####Mech by SKY######
- ######################
- @name MediumMech V4
- @inputs Cam:wirelink
- @persist [Seat Driver None]:entity Parent SeatValid HoverHeight Table:table
- @persist [Vector1 Vector2 Vector3 Vector4 ]:vector
- @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
- @persist Ground SpeedVel RandVec:table SprintCounter JumpCharge JumpActive SlideCounter DoasSlide Locker AimP:vector Dias:number
- @persist SlideF Slide SlideR SlideL SlideLRot SlideRRot CounterX Col Last_one HoloGram Tail:array Evel:vector On JumpDist Count
- @persist Vector:array SniperMode Sniper
- @trigger
- @model models/hunter/blocks/cube025x025x025.mdl
- Count++
- rangerPersist(1)
- runOnLast(1)
- if(last()){ On = 0 }
- E=entity()
- Driver = Seat:driver()
- #------------#{
- ######################################
- #-General setting-#{
- HoverHeight = 69
- RotationSpeed = 100
- Front_Back = 54
- Right_Left = 30
- Up_Down = 70
- #-----------------#}
- ######################################
- #-Front leg settings-#{
- FrontLegLength1 = 103
- FrontLegLength2 = 103
- #--------------------#}
- ######################################
- #-Back leg settings-#{
- BackLegLength1=43
- BackLegLength2=33
- BackLegLength3=28
- #-------------------#}
- ######################################
- #-General leg settings-#
- StepSpeed = 3.2 #normal 3.2 another is 1.6
- MaxStepUp = 20
- StepLength = 140
- MaxDist = 15
- PositionPlus = 5
- TimeBetweenStep = 2.9 #it should be 2.9
- VeloCity = 1
- Active = 1 #Activates the animation
- #----------------------#
- E:setMass(5000)
- ######################################
- #------------#}
- if(!holoEntity(Last_one)){
- Interval = 120
- }else{
- Interval = 110
- }
- if(changed(holoEntity(99999))&holoEntity(99999)&Cam:entity()){
- Cam:entity():setMass(500000)
- Cam["Parent",entity] = holoEntity(99999)
- }
- if(Cam:entity() & !holoEntity(99999) & holoEntity(Last_one)){
- holoCreate(99999,E:toWorld(vec(-50,0,50)),vec(0.01),ang(),vec(0),"")
- holoParent(99999,E)
- }
- if(holoEntity(99999)){
- holoAng(99999,ang())
- }
- interval(Interval)
- if(Seat){
- W=Driver:keyForward()
- A=Driver:keyLeft()
- S=Driver:keyBack()
- D=Driver:keyRight()
- Space=Driver:keyJump()
- Shifts=Driver:keySprint()
- Shift = (W & Shifts)
- Alt=Driver:keyWalk()
- Mouse1=Driver:keyAttack2()
- Mouse2=Driver:keyAttack1()
- R=Driver:keyReload()
- F=Driver:keyPressed("F")
- }
- if(changed(E)&E){
- E:setAlpha(255)
- Locker = 1
- function wirelink searchFor( Entity:wirelink ){
- if(Entity:entity():isValid()){
- # Entity = Cam["Entity",entity]:wirelink()
- }
- }
- function angle eAng(){
- return ang(0,E:angles():yaw(),0)
- }
- function ranger entity:ran(RanLength:number,PositionRan:vector){
- rangerFilter(E)
- rangerFilter(players())
- rangerFilter(Seat)
- return rangerOffset(RanLength,PositionRan,This:up()*-1)
- }
- Vector1=Ranger[1,ranger]:position()
- Vector2=Ranger[2,ranger]:position()
- Vector3=Ranger[3,ranger]:position()
- Vector4=Ranger[4,ranger]:position()
- Pos[1,vector] = holoEntity(1000):pos()
- Pos[2,vector] = holoEntity(2000):pos()
- Pos[3,vector] = holoEntity(3000):pos()
- Pos[4,vector] = holoEntity(4000):pos()
- Svp[1,vector] = Ranger[1,ranger]:pos()
- Svp[2,vector] = Ranger[2,ranger]:pos()
- Svp[3,vector] = Ranger[3,ranger]:pos()
- Svp[4,vector] = Ranger[4,ranger]:pos()
- Ranger[1,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(Front_Back,Right_Left+PositionPlus,0)),E:up()*-1)
- Ranger[2,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(Front_Back,-Right_Left+PositionPlus,0)),E:up()*-1)
- Ranger[3,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(-Front_Back,Right_Left+PositionPlus,0)),E:up()*-1)
- Ranger[4,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(-Front_Back,-Right_Left+PositionPlus,0)),E:up()*-1)
- function entity c(Index:number,Posi:vector,Scale:vector,Angle:angle,Colo:vector,Model:string,Parent:entity,Alpha:number){
- holoCreate(Index) holoPos(Index,Posi) holoScale(Index,Scale) holoAng(Index,Angle) holoColor(Index,Colo) holoModel(Index,Model)
- holoParent(Index,Parent) holoAlpha(Index,Alpha)
- return holoEntity(Index)
- }
- function number entity:doasBearingRotate( Target:vector, Yaw, Mul ,C) {
- return Yaw - bearing(This:pos(), ang(0, Yaw-90, 0), Target) / Mul * C
- }
- function string opri(Message:string,ColorM:vector){
- Seat:printColorDriver(vec(0,255,255),"[",vec(255,0,0),"E2",vec(0,255,255),"]",ColorM,Message)
- }
- function string opri2(Message2:string,ColorM2:vector){
- printColor(vec(0,255,255),"[",vec(255,0,0),"E2",vec(0,255,255),"]",ColorM2,Message2)
- }
- function number entity:seatIsValid(){
- if(changed(This)&This){
- opri2("Seat found!",vec(255,255,0))
- }
- if(This){
- Driver = This:driver()
- }
- }
- function number dis(VC1:vector,VC2:vector){
- return VC1:distance(VC2)
- }
- function vector aimPosItions(){
- return rangerOffset(9999999,E:pos()+vec(0,0,0),ang(-E:elevation(Driver:aimPos()),-E:bearing(Driver:aimPos())+90,0):forward()):position()
- }
- function angle entity:mouthMovement(Smoothness:number){
- 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))
- }
- function grounds(){
- local MaxHitLength = HoverHeight + 40
- rangerFilter(E)
- rangerFilter(players())
- rangerFilter(Seat)
- local Gran = rangerOffset(999999999,E:toWorld(vec(0,0,0)),vec(0,0,-1)):distance()
- Ground = (Gran <= MaxHitLength)
- Ground2 = (Gran <= MaxHitLength+20)
- E:propGravity(Ground ? 0 : 1)
- #E:propGravity(0)
- }
- function vector entity:hover(Friction:number,Vel:number){
- local AntiRot2 = (cosr(curtime())*2.5 )* !(Shift|Alt|Space|W|A|S|D)
- local HoverPos = (holoEntity(1000):pos()+holoEntity(2000):pos()+holoEntity(3000):pos()+holoEntity(4000):pos()) / 4
- local Positions = ((((HoverPos + vec(0,0,HoverHeight-AntiRot2))-This:pos()) * This:mass())*Friction)
- #running#
- if(Shift&!Space&Ground){
- if(SprintCounter<=800){
- SprintCounter += 50
- }
- }
- if(changed(!Shift)){
- SprintCounter = 0
- }
- local Sprint = (This:forward()*This:mass()*SprintCounter*Shift)
- #########
- if(Ground & JumpActive == 0 & !Shift){ MoveMentPlusAnim = (This:forward()*This:mass()*150*(W-S))+(This:right()*This:mass()*75*(D-A)) }
- if(Ground){
- if(Space&!Shift&!SniperMode){
- JumpCharge = 1
- }
- }
- if(JumpCharge == 1){
- if(changed(!Space)&!Space){
- AimP = aimPosItions()
- JumpActive = 1
- if(AimP:distance(E:pos())>3000|AimP:distance(E:pos())<600){
- JumpCharge = 0
- JumpActive = 0
- }
- }
- }
- if(changed(JumpActive)&JumpActive){ E:soundPlay(7,soundDuration("npc/dog/dog_pneumatic"+randint(1,2)+".wav"),"npc/dog/dog_pneumatic"+randint(1,2)+".wav") }
- if(JumpActive==1&perf()){
- JumpCharge = 0
- Dias = vec2(AimP):distance(vec2(E:pos()))
- JumpC = (((AimP + vec(0,0,Dias / 1.9)-E:pos())-E:vel()*0.50)*E:mass()) * 0.8
- JumpDist=AimP:distance(E:pos())
- if(Dias < 100){
- JumpCharge = 0
- JumpActive = 0
- }
- }
- #sliding#
- if(Ground){
- if(SlideF){
- SlideForward = E:forward()*randint(250,400)
- Slide = 1
- }
- if(SlideR){
- SlideRight = E:right()*randint(250,400)
- Slide = 1
- }
- if(SlideL){
- SlideLeft = E:right()*-randint(250,400)
- Slide = 1
- }
- }
- if(changed(Slide)&Slide){ E:soundPlay(5,1.3,"npc/dog/dog_destroy_door1.wav") }
- if(Slide==1){
- SlideCounter+=5
- if(SlideCounter >=49){ SlideCounter = 0 Slide = 0 SlideF = 0 SlideR = 0 SlideL = 0 SlideLRot=0 SlideRRot = 0}
- }
- ##########
- #########
- if(Ground){
- VeloCity2=-This:vel()*This:mass()*Vel
- }else{
- if(JumpActive==0){
- VeloCity2 = -This:vel()*This:mass()*0.1
- }
- }
- local SlideFuncs = (SlideForward + SlideRight + SlideLeft) * E:mass()
- This:applyForce(((((Positions+(Sprint*Run))*Ground)*!JumpActive)+JumpC+SlideFuncs) + VeloCity2 + MoveMentPlusAnim)
- }
- function angle angleRotate(){
- local HR1 = E:ran(HoverHeight * 2,E:toWorld(vec(Front_Back/2,0,0)))
- local HR2 = E:ran(HoverHeight * 2,E:toWorld(vec(0,0,0)))
- local Rot = (((HR1:hitNormal()+HR1:pos())/160-(HR2:hitNormal()+HR2:pos())/160):toAngle())
- if(SlideL){
- SlideLRot -= 2
- }
- if(SlideR){
- SlideRRot += 2
- }
- local AntiRot = (cosr(curtime())*1.5 )* !(Shift|Alt|Space)
- local RunAngler = (cosr(curtime()*10)*5)*Shift
- local Z = vec(Driver:eye():dot(E:up()),0,Driver:eye():dot(E:up())):z()
- local SprintAngler = cos(Z*2)*3 * Shift
- if(JumpActive == 0){
- ClampedAngles = clamp(Z* 20 , Shift ? 0 : -15 ,15)
- if(Driver){
- rangerFilter(E)
- rangerFilter(Seat)
- Aim = rangerOffset(99999, E:toWorld(vec(10,0,0)), E:toLocalAxis(Driver:eye())):position()
- }
- if(Driver){
- if(Ground){
- Angler = ang(RunAngler+SprintAngler+Rot:pitch()+AntiRot+(10*(SlideF|SlideL|SlideR|Alt))-ClampedAngles*!Alt,
- E:doasBearingRotate(Aim, E:angles():yaw(), 10-(5*Slide)+(40*SniperMode),Driver:isValid())+(SlideRRot*SlideR)+(SlideLRot*SlideL),(-10*SlideL)+(10*SlideR))
- }else{
- Angler = eAng()
- }
- }else{
- Angler = eAng()
- }
- }else{
- local DDt = (AimP - E:pos()):toAngle():yaw()
- Angler = ang(22.5 +clamp(-sin(AimP:distance(E:pos())/180)*JumpDist,-30,25) ,DDt,0)
- }
- if(Driver){
- Cam["Activated",number] = 1
- }else{
- if(changed(!Driver)&!Driver){
- Cam["Activated",number] = 0
- }
- }
- local Torque = E:toLocal(rotationVector(quat(angnorm(Angler)) / quat(E)) + E:pos())
- E:applyTorque((round(Torque*150)-E:angVelVector()*20)*E:inertia())
- }
- function number co(A, B, C){
- return acos((A^2 + B^2 - C^2) / (2*A*B))
- }
- function angle ik(L1,L2,Hip:vector,End:vector,I1,I2,Bs:entity){
- local Rotation = ang(0, 0, 0)
- local Axis1 = End-Hip
- local Axis = Bs:toLocalAxis(Axis1):rotate(Rotation)
- local Angle=Axis:toAngle():setRoll(-bearing(Hip,Bs:angles(),End))
- local Dist=min(Axis:length(),L1+L2)
- local Quat=quat(angnorm(Angle))*qRotation(vec(0,90+angnorm(co(round(Dist),L1,L2)),0))
- holoAng(I1,Bs:toWorld(Quat:toAngle()))
- holoAng(I2,holoEntity(I1):toWorld(ang(angnorm(co(L2, L1, round(Dist)))+180,0,0)))
- }
- function number cosine (One, Two, Three){
- return acos( (Three^2 + Two^2 - One^2) / (2*Two*Three) )
- }
- function kinemize ([Ent Hip Knee Ankle]:entity, FootPos:vector,L1,L2,L3) {
- #-Hip
- local Total = L1 + L2 +L3
- local Bearing = -bearing(Hip:pos(), Ent:angles(), FootPos)
- local Angle = Ent:toLocalAxis(FootPos - Hip:pos()):toAngle():setRoll(Bearing)
- local Offset = Total - abs(min(Hip:pos():distance(FootPos), Total))
- local Quat = quat(Angle) * qRotation(vec(0, -Offset + 0, 0))
- holoAng(holoIndex(Hip), Ent:toWorld(slerp(quat(Hip), Quat, 1):toAngle()))
- #-Second
- local Distance = min(Knee:pos():distance(FootPos), L2+L3)
- local Axis = Hip:toLocalAxis(Knee:pos() - FootPos)
- local Atan = atan(-Axis:z(), Axis:x()) + cosine(L3, L2, Distance) + 90
- holoAng(holoIndex(Knee), Hip:toWorld(ang(Atan,0,0)))
- #-Third
- holoAng(holoIndex(Ankle), Knee:toWorld(ang(cosine(Distance, L2, L3), 0, 0)))
- }
- function entity findEnt(Model_to_find:string){
- if(!Seat){
- findByClass(Model_to_find)
- findSortByDistance(E:pos())
- if(find():owner()==owner()){
- Seat = find()
- Seat:setAlpha(255)
- }
- }
- if(changed(Seat)&Seat){
- Seat:seatIsValid()
- }
- }
- function number makeItdoSounds(ID:string){
- local HitRanger_1 = E:ran(8.5,holoEntity(1000):pos())
- local HitRanger_2 = E:ran(8.5,holoEntity(2000):pos())
- local HitRanger_3 = E:ran(8.5,holoEntity(3000):pos())
- local HitRanger_4 = E:ran(8.5,holoEntity(4000):pos())
- if(changed(HitRanger_1:hit()) & HitRanger_1:hit()){
- holoEntity(1000):soundPlay(11,soundDuration(ID),ID)
- }
- if(changed(HitRanger_2:hit()) & HitRanger_2:hit()){
- holoEntity(2000):soundPlay(12,soundDuration(ID),ID)
- }
- if(changed(HitRanger_3:hit()) & HitRanger_3:hit()){
- holoEntity(3000):soundPlay(13,soundDuration(ID),ID)
- }
- if(changed(HitRanger_4:hit()) & HitRanger_4:hit()){
- holoEntity(4000):soundPlay(14,soundDuration(ID),ID)
- }
- soundVolume(1,randint(50,100))
- soundVolume(2,randint(50,100))
- soundVolume(3,randint(50,100))
- soundVolume(4,randint(50,100))
- }
- function entity entity:parentent(Entity2:entity,PositionToSet:vector,AngleToSet:angle){
- local Entity_1 = This
- if(Entity_1&Parent == 0){
- Entity_1:setPos(PositionToSet)
- Entity_1:setAng(AngleToSet)
- Entity_1:propFreeze(1)
- Entity_1:setMass(500000)
- Seat:setAlpha(0)
- timer("parent",1500)
- }
- if(clk("parent")){
- stoptimer("parent")
- Entity_1:parentTo(Entity2)
- Parent = 1
- }
- if(!Entity_1){
- Parent = 0
- }
- }
- function number velX(){
- return clamp((E:velL():x()/10) * !(W|S),-StepLength,StepLength)
- }
- function number velY(){
- return clamp(((E:velL():y()) / 12 ) * !(A|D),-StepLength/2,StepLength/2)
- }
- SeatValid = 1
- function entity entity:ifSeatIsValidEntity(){
- if(!Seat & SeatValid==1){
- findEnt("prop_vehicle_prisoner_pod")
- }
- if(changed(Parent)){
- SeatValid = 0
- }
- if(SeatValid==1 & Parent==0){
- Seat:parentent(E,E:toWorld(vec(40,0,10)),E:toWorld(ang(0,-90,0)))
- timer("check",1000)
- }
- if(clk("check")){
- Seat:parentent(E,E:toWorld(vec(40,0,10)),E:toWorld(ang(0,-90,0)))
- stoptimer("check")
- }
- Seat:parentent(E,E:toWorld(vec(40,0,10)),E:toWorld(ang(0,-90,0)))
- if(!Seat){ SeatValid = 1 Parent = 0 }
- }
- #animation#
- function number entity:kick_the_bitch_out(){
- local GiveKey = owner():keyPressed("pad_9")
- 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 ) ") } }
- if(changed(GiveKey)&GiveKey){ Locker +=1 }
- if(changed(Locker == 1)&Locker == 1){ opri2("Mech is now locked!",vec(150,0,0)) }
- if(changed(Locker == 0)&Locker == 0){ opri2("Mech is now unlocked!",vec(0,0,150)) }
- if(Locker == 1){ if(This:driver()!=owner()){ This:killPod() } }
- if(Locker >= 2){ Locker = 0 }
- }
- function noGround(){
- 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)
- 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)
- 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)
- 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)
- holoPos(1000,Ranger[1,ranger]:position())
- holoPos(2000,Ranger[2,ranger]:position())
- holoPos(3000,Ranger[3,ranger]:position())
- holoPos(4000,Ranger[4,ranger]:position())
- Vector1=Ranger[1,ranger]:position()
- Vector2=Ranger[2,ranger]:position()
- Vector3=Ranger[3,ranger]:position()
- Vector4=Ranger[4,ranger]:position()
- Pos[1,vector] = Ranger[1,ranger]:position()
- Pos[2,vector] = Ranger[2,ranger]:position()
- Pos[3,vector] = Ranger[3,ranger]:position()
- Pos[4,vector] = Ranger[4,ranger]:position()
- Svp[1,vector] = Ranger[1,ranger]:position()
- Svp[2,vector] = Ranger[2,ranger]:position()
- Svp[3,vector] = Ranger[3,ranger]:position()
- Svp[4,vector] = Ranger[4,ranger]:position()
- }
- function vector slideFunc2(){
- 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)
- 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)
- 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)
- 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)
- holoPos(1000,Ranger[1,ranger]:position())
- holoPos(2000,Ranger[2,ranger]:position())
- holoPos(3000,Ranger[3,ranger]:position())
- holoPos(4000,Ranger[4,ranger]:position())
- Vector1=Ranger[1,ranger]:position()
- Vector2=Ranger[2,ranger]:position()
- Vector3=Ranger[3,ranger]:position()
- Vector4=Ranger[4,ranger]:position()
- Pos[1,vector] = Ranger[1,ranger]:position()
- Pos[2,vector] = Ranger[2,ranger]:position()
- Pos[3,vector] = Ranger[3,ranger]:position()
- Pos[4,vector] = Ranger[4,ranger]:position()
- Svp[1,vector] = Ranger[1,ranger]:position()
- Svp[2,vector] = Ranger[2,ranger]:position()
- Svp[3,vector] = Ranger[3,ranger]:position()
- Svp[4,vector] = Ranger[4,ranger]:position()
- }
- function jumpAnim(){
- local AD = (AimP-E:pos()):length() / 100
- Ranger[1,ranger] = rangerOffset(HoverHeight *1 , E:toWorld(vec(Front_Back-20+clamp(AimP:distance(E:pos())/5,-120,90)
- ,Right_Left+PositionPlus,10+clamp(E:velL():z()/40,-20,20))),E:up()*-1)
- Ranger[2,ranger] = rangerOffset(HoverHeight *1 , E:toWorld(vec(Front_Back-20+clamp(AimP:distance(E:pos())/5,-120,90)
- ,-Right_Left-PositionPlus,10+clamp(E:velL():z()/40,-20,20))),E:up()*-1)
- Ranger[3,ranger] = rangerOffset(HoverHeight *1, E:toWorld(vec(-Front_Back+20-clamp(AimP:distance(E:pos())/8,-160,100)
- ,Right_Left+PositionPlus,10+clamp(E:velL():z()/40,-10,20))),E:up()*-1)
- Ranger[4,ranger] = rangerOffset(HoverHeight *1 , E:toWorld(vec(-Front_Back+20-clamp(AimP:distance(E:pos())/8,-160,100)
- ,-Right_Left-PositionPlus,10+clamp(E:velL():z()/40,-10,20))),E:up()*-1)
- Vector1=Ranger[1,ranger]:position()
- Vector2=Ranger[2,ranger]:position()
- Vector3=Ranger[3,ranger]:position()
- Vector4=Ranger[4,ranger]:position()
- Pos[1,vector] = holoEntity(1000):pos()
- Pos[2,vector] = holoEntity(2000):pos()
- Pos[3,vector] = holoEntity(3000):pos()
- Pos[4,vector] = holoEntity(4000):pos()
- Svp[1,vector] = Ranger[1,ranger]:pos()
- Svp[2,vector] = Ranger[2,ranger]:pos()
- Svp[3,vector] = Ranger[3,ranger]:pos()
- Svp[4,vector] = Ranger[4,ranger]:pos()
- holoPos(1000,Ranger[1,ranger]:pos())
- holoPos(2000,Ranger[2,ranger]:pos())
- holoPos(3000,Ranger[3,ranger]:pos())
- holoPos(4000,Ranger[4,ranger]:pos())
- }
- function changedGround(){
- Ranger[1,ranger] = rangerOffset(HoverHeight * 5 , E:toWorld(vec(Front_Back,Right_Left+PositionPlus,0)),E:up()*-1)
- Ranger[2,ranger] = rangerOffset(HoverHeight * 5 , E:toWorld(vec(Front_Back,-Right_Left-PositionPlus,0)),E:up()*-1)
- Ranger[3,ranger] = rangerOffset(HoverHeight * 5 , E:toWorld(vec(-Front_Back,Right_Left+PositionPlus,0)),E:up()*-1)
- Ranger[4,ranger] = rangerOffset(HoverHeight * 5 , E:toWorld(vec(-Front_Back,-Right_Left-PositionPlus,0)),E:up()*-1)
- Vector1=Ranger[1,ranger]:position()
- Vector2=Ranger[2,ranger]:position()
- Vector3=Ranger[3,ranger]:position()
- Vector4=Ranger[4,ranger]:position()
- Pos[1,vector] = Ranger[1,ranger]:position()
- Pos[2,vector] = Ranger[2,ranger]:position()
- Pos[3,vector] = Ranger[3,ranger]:position()
- Pos[4,vector] = Ranger[4,ranger]:position()
- Svp[1,vector] = Ranger[1,ranger]:position()
- Svp[2,vector] = Ranger[2,ranger]:position()
- Svp[3,vector] = Ranger[3,ranger]:position()
- Svp[4,vector] = Ranger[4,ranger]:position()
- holoPos(1000,Ranger[1,ranger]:position())
- holoPos(2000,Ranger[2,ranger]:position())
- holoPos(3000,Ranger[3,ranger]:position())
- holoPos(4000,Ranger[4,ranger]:position())
- }
- function vector makeItRun(){
- if(E:vel():length()/10 < 50){
- SpeedVel -= abs(E:vel():length() / 5)
- }elseif(E:vel():length()/10 > 50){
- SpeedVel -= abs(E:vel():length() / 11)
- }
- HoverHeight = HoverHeight / 1.2
- Ranger[1,ranger] = rangerOffset(HoverHeight * 2 , E:toWorld(vec(Front_Back,Right_Left+PositionPlus,0)),E:up()*-1)
- Ranger[2,ranger] = rangerOffset(HoverHeight * 2 , E:toWorld(vec(Front_Back,-Right_Left-PositionPlus,0)),E:up()*-1)
- Ranger[3,ranger] = rangerOffset(HoverHeight * 2 , E:toWorld(vec(-Front_Back,Right_Left+PositionPlus,0)),E:up()*-1)
- Ranger[4,ranger] = rangerOffset(HoverHeight * 2 , E:toWorld(vec(-Front_Back,-Right_Left-PositionPlus,0)),E:up()*-1)
- local TD1 = (holoEntity(1):pos():distance(Ranger[1,ranger]:position()))
- local TD2 = (holoEntity(4):pos():distance(Ranger[2,ranger]:position()))
- local TD3 = (holoEntity(7):pos():distance(Ranger[3,ranger]:position()))
- local TD4 = (holoEntity(11):pos():distance(Ranger[4,ranger]:position()))
- 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))
- ,Right_Left+PositionPlus,-TD1+4+clamp(sin(-SpeedVel)*-TD1/2,0,TD1/2))))
- 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)),
- -Right_Left-PositionPlus,-TD2+4+clamp(sin(-SpeedVel)*-TD2/2,0,TD2/2))))
- 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))
- ,Right_Left+PositionPlus,-TD3+4+clamp(sin(-SpeedVel)*TD3/2,0,TD3/2))))
- 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))
- ,-Right_Left-PositionPlus,-TD4+4+clamp(sin(-SpeedVel)*TD4/2,0,TD4/2))))
- Vector1=Ranger[1,ranger]:position()
- Vector2=Ranger[2,ranger]:position()
- Vector3=Ranger[3,ranger]:position()
- Vector4=Ranger[4,ranger]:position()
- Pos[1,vector] = Ranger[1,ranger]:position()
- Pos[2,vector] = Ranger[2,ranger]:position()
- Pos[3,vector] = Ranger[3,ranger]:position()
- Pos[4,vector] = Ranger[4,ranger]:position()
- Svp[1,vector] = Ranger[1,ranger]:position()
- Svp[2,vector] = Ranger[2,ranger]:position()
- Svp[3,vector] = Ranger[3,ranger]:position()
- Svp[4,vector] = Ranger[4,ranger]:position()
- }
- function vector entity:legStepCalc(All:number,UpMove:number,MS:number,CouterPos:vector,PosToMove:vector){
- if(This:pos():distance(PosToMove)>1){
- if(CouterPos:distance(PosToMove)>=MS&perf()){
- Pos[All,vector] = PosToMove
- Must[All,number] = PosToMove:distance(CouterPos)
- Up[All,number] = clamp(Must[All,number]/5000,-0,MaxStepUp)
- StepC[All,number] = 0
- }
- }
- }
- function sniperPos() {
- Ranger[1,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(Front_Back+40+StepLength/8*(W-S)-velX()
- ,Right_Left+40+StepLength/8*(A-D)+PositionPlus-velY(),30)),vec(0,0,-1))
- Ranger[2,ranger] =rangerOffset(HoverHeight * 2,E:toWorld(vec(Front_Back+40+StepLength/8*(W-S)-velX()
- ,-Right_Left-40+StepLength/8*(A-D)-PositionPlus-velY(),30)),vec(0,0,-1))
- Ranger[3,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(-Front_Back-40+(StepLength/8)*(W-S)-velX()
- ,Right_Left+40+StepLength/8*(A-D)+PositionPlus-velY(),30)),vec(0,0,-1))
- Ranger[4,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(-Front_Back-40+(StepLength/8)*(W-S)-velX()
- ,-Right_Left-40+StepLength/8*(A-D)-PositionPlus-velY(),30)),vec(0,0,-1))
- HoverHeight = HoverHeight / 1.5
- }
- function ranger ranPos(){
- Ranger[1,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(Front_Back+StepLength/1.15*(W-S)-velX()
- ,Right_Left+StepLength/2*(A-D)+PositionPlus-velY(),30)),vec(0,0,-1))
- Ranger[2,ranger] =rangerOffset(HoverHeight * 2,E:toWorld(vec(Front_Back+StepLength/1.15*(W-S)-velX()
- ,-Right_Left+StepLength/2*(A-D)-PositionPlus-velY(),30)),vec(0,0,-1))
- Ranger[3,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(-Front_Back+(StepLength/1.45)*(W-S)-velX()
- ,Right_Left+StepLength/2*(A-D)+PositionPlus-velY(),30)),vec(0,0,-1))
- Ranger[4,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(-Front_Back+(StepLength/1.45)*(W-S)-velX()
- ,-Right_Left+StepLength/2*(A-D)-PositionPlus-velY(),30)),vec(0,0,-1))
- }
- function getKeys(){
- if(changed(R)&R){ Sniper += 1 }
- if(Sniper >= 2){ Sniper = 0 }
- if(Sniper == 1){
- SniperMode = 1
- }
- if(Sniper == 0){ SniperMode = 0 }
- }
- function cycel(){
- if(int(Count/10)){
- if(Active&Run==0){ StepCounter=StepCounter + clamp((E:vel():length()/(110+((10)*(A|D)))),1,5) }
- if(changed(StepCounter>=(TimeBetweenStep*3.468)) & (StepCounter>=TimeBetweenStep*3.468)){ StepCounter = 0 }
- }
- }
- function vector countPositions1(StepSpeed1:number,PlusPos1:vector,MinusPos1:vector,StepStrength1:number){
- Vector1+=((tickInterval()*StepSpeed1)*clamp(PlusPos1-MinusPos1,0,50))*StepStrength1
- }
- function vector countPositions2(StepSpeed2:number,PlusPos2:vector,MinusPos2:vector,StepStrength2:number){
- Vector2+=((tickInterval()*StepSpeed2)*clamp(PlusPos2-MinusPos2,0,50))*StepStrength2
- }
- function vector countPositions3(StepSpeed3:number,PlusPos3:vector,MinusPos3:vector,StepStrength3:number){
- Vector3+=((tickInterval()*StepSpeed3)*clamp(PlusPos3-MinusPos3,0,50))*StepStrength3
- }
- function vector countPositions4(StepSpeed4:number,PlusPos4:vector,MinusPos4:vector,StepStrength4:number){
- Vector4+=((tickInterval()*StepSpeed4)*clamp(PlusPos4-MinusPos4,0,50))*StepStrength4
- }
- function vector animateFeet(MS:number,SL:number){
- getKeys()
- if(Shift&!Space){ Run = 1 } else { Run = 0 }
- if(changed(Run)&Run){
- RandVec[1,number] = abs(randint(30))
- RandVec[2,number] = abs(randint(30))
- RandVec[3,number] = abs(randint(30))
- RandVec[4,number] = abs(randint(30))
- }
- if(!Run & perf()){
- if(SniperMode == 0){
- ranPos()
- }else{
- sniperPos()
- }
- }
- if(holoEntity(1000):pos():distance(Svp[1,vector])>1&int(Count/40)){
- countPositions1(StepSpeed,Pos[1,vector],Vector1,StepC[1,number])
- }
- if(holoEntity(2000):pos():distance(Svp[2,vector])>1&int(Count/40)){
- countPositions2(StepSpeed,Pos[2,vector],Vector2,StepC[2,number])
- }
- if(holoEntity(3000):pos():distance(Svp[3,vector])>1&int(Count/40)){
- countPositions3(StepSpeed,Pos[3,vector],Vector3,StepC[3,number])
- }
- if(holoEntity(4000):pos():distance(Svp[4,vector])>1&int(Count/40)){
- countPositions4(StepSpeed,Pos[4,vector],Vector4,StepC[4,number])
- }
- #step timers#
- if(Active&Run==1){ makeItRun() }
- ############
- if(!Ground& JumpActive==0){
- noGround()
- }
- if(changed(Ground)&Ground& JumpActive==0){
- changedGround()
- }
- ####################
- ##############################
- E:hover(VeloCity+2.5+((3*(W|S))+((0.5*(A|D))*!(W|S)))*!SniperMode,VeloCity)
- angleRotate()
- }
- function vector doasStep(PP:vector,NA:number){
- return PP + E:up() * -sin(Pos[NA,vector]:distance(PP) / Must[NA,number] * 180 - 180)*clamp(StepC[NA,number],0,Must[NA,number])
- }
- function stepping(){
- cycel()
- if(Run == 0 & Ground&int(Count/40)){
- ###sets the step positions of the front legs####
- if(changed(StepCounter<=1)&StepCounter<=1){
- AnimChange[1,number] = 1
- Svp[1,vector] = Ranger[1,ranger]:pos()
- if(holoEntity(1000):pos():distance(Svp[1,vector])>1){
- holoEntity(1000):legStepCalc(1,MaxStepUp,MaxDist,Vector1,Svp[1,vector]+vec(0,0,4))
- }
- }else{
- if(SniperMode){ StepC[1,number] = 15 }else{
- StepC[1,number] = clamp(E:vel():length()/2,10,22)
- }
- }
- if(changed(StepCounter>=TimeBetweenStep*1.8)&StepCounter>=TimeBetweenStep*1.8){
- AnimChange[2,number] = 1
- Svp[2,vector] = Ranger[2,ranger]:pos()
- if(holoEntity(2000):pos():distance(Svp[2,vector])>1){
- holoEntity(2000):legStepCalc(2,MaxStepUp,MaxDist,Vector2,Svp[2,vector]+vec(0,0,4))
- }
- }else{
- if(SniperMode){ StepC[2,number] = 15 }else{
- StepC[2,number] = clamp(E:vel():length()/2,10,22)
- }
- }
- ###############################
- ###sets the step positions of the back legs####
- if(changed(StepCounter>=TimeBetweenStep)&StepCounter>=TimeBetweenStep){
- AnimChange[3,number] = 1
- Svp[3,vector] = Ranger[3,ranger]:pos()
- if(holoEntity(3000):pos():distance(Svp[3,vector])>1){
- holoEntity(3000):legStepCalc(3,MaxStepUp,MaxDist,Vector3,Svp[3,vector]+vec(0,0,4))
- }
- }else{
- if(SniperMode){ StepC[3,number] = 15 }else{
- StepC[3,number] = clamp(E:vel():length()/2,10,22)
- }
- }
- if(changed(StepCounter>=TimeBetweenStep*2.8)&StepCounter>=TimeBetweenStep*2.8){
- AnimChange[4,number] = 1
- Svp[4,vector] = Ranger[4,ranger]:pos()
- if(holoEntity(4000):pos():distance(Svp[4,vector])>1){
- holoEntity(4000):legStepCalc(4,MaxStepUp,MaxDist,Vector4,Svp[4,vector]+vec(0,0,4))
- }
- }else{
- if(SniperMode){ StepC[4,number] = 15 }else{
- StepC[4,number] = clamp(E:vel():length()/3,10,22)
- }
- }
- if((((changed(!Shift)&!Shift & !(A|D|S))) & (SlideR == 0 & SlideL == 0)) | (changed(Ground)&Ground)){
- SlideF = 1
- }
- if(changed(Shifts& A) &Shifts & SlideF == 0 & SlideR == 0&!W){
- SlideL = 1
- SlideF = 0
- }
- if(changed(Shifts&D) &Shifts & SlideF == 0 & SlideL == 0&!W){
- SlideR = 1
- SlideF = 0
- }
- if(Slide){
- slideFunc2()
- }
- ###############################
- #generates the step#
- if((Space & !Shift) | Alt){
- HoverHeight = HoverHeight / 1.4
- }
- }
- }
- function vector finalPos(){
- return aimPosItions()+vec(0,0,40+cosr(curtime()*2)*8)
- }
- function vector getPosFromHolo(H211){
- if(Driver:isValid()&int(Count/20)){
- holoPos(H211,finalPos())
- holoAng(H211,ang())
- local Col = Col + 1
- holoColor(H211,hsv2rgb(Col,1,1))
- holoAlpha(H211,255)
- }else{
- holoAlpha(H211,0)
- }
- }
- function animfix(){
- Vector1=Ranger[1,ranger]:position()
- Vector2=Ranger[2,ranger]:position()
- Vector3=Ranger[3,ranger]:position()
- Vector4=Ranger[4,ranger]:position()
- Pos[1,vector] = holoEntity(1000):pos()
- Pos[2,vector] = holoEntity(2000):pos()
- Pos[3,vector] = holoEntity(3000):pos()
- Pos[4,vector] = holoEntity(4000):pos()
- Svp[1,vector] = Ranger[1,ranger]:pos()
- Svp[2,vector] = Ranger[2,ranger]:pos()
- Svp[3,vector] = Ranger[3,ranger]:pos()
- Svp[4,vector] = Ranger[4,ranger]:pos()
- Ranger[1,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(Front_Back,Right_Left+PositionPlus,0)),E:up()*-1)
- Ranger[2,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(Front_Back,-Right_Left+PositionPlus,0)),E:up()*-1)
- Ranger[3,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(-Front_Back,Right_Left+PositionPlus,0)),E:up()*-1)
- Ranger[4,ranger] = rangerOffset(HoverHeight * 2,E:toWorld(vec(-Front_Back,-Right_Left+PositionPlus,0)),E:up()*-1)
- }
- function number isThere(HoloEntity,IndexFrom){
- return (holoEntity(HoloEntity):pos():distance(Svp[IndexFrom,vector])<2)
- }
- function animation(){
- if(Driver){
- getPosFromHolo(10000)
- }
- if(Shift){ makeItdoSounds("npc/dog/dog_footstep_run"+randint(1,8)+".wav") }
- stepping()
- if(Ground & holoEntity(Last_one)){
- if(AnimChange[1,number] == 1 & perf()&holoEntity(1000):pos():distance(Svp[1,vector])>1&int(Count/5)){
- holoPos(1000,doasStep(Vector1,1))
- }
- if(AnimChange[2,number] == 1 & perf()&holoEntity(2000):pos():distance(Svp[2,vector])>1&int(Count/5)){
- holoPos(2000,doasStep(Vector2,2))
- }
- if(AnimChange[3,number] == 1 & perf()&holoEntity(3000):pos():distance(Svp[3,vector])>1&int(Count/5)){
- holoPos(3000,doasStep(Vector3,3))
- }
- if(AnimChange[4,number] == 1 & perf()&holoEntity(4000):pos():distance(Svp[4,vector])>1&int(Count/5)){
- holoPos(4000,doasStep(Vector4,4))
- }
- }
- if(isThere(1000,1)){ AnimChange[1,number] = 0 }
- if(isThere(2000,2)){ AnimChange[2,number] = 0 }
- if(isThere(3000,3)){ AnimChange[3,number] = 0 }
- if(isThere(4000,4)){ AnimChange[4,number] = 0 }
- }
- animfix()
- function angleFeet(Ho,Ht,Htt,Hf){
- if(int(Count/30)){
- holoAng(Ho,eAng())
- holoAng(Ht,eAng())
- holoAng(Htt,eAng())
- holoAng(Hf,eAng())
- }
- }
- function number holoTimerMaterial(){
- timer("material",300)
- }
- function number materialset(){
- for(Holo=1,Last_one){
- holoMaterial(Holo,"sprops/trans/misc/ls_m1")
- }
- }
- function number entity:generateTail(Dist:number,HoloDist:number,StartFromHolo:number,MaxHoloGram:number){
- if(HoloGram <= MaxHoloGram & perf() & holoCanCreate()){
- HoloGram += 1
- }
- if(changed(HoloGram)&HoloGram){
- c(StartFromHolo + HoloGram , HoloGram <= 1 ? This:toWorld(vec(-HoloDist/4,0,3)
- ) : holoEntity(StartFromHolo+HoloGram-1):toWorld(vec(0,0, HoloDist))
- , vec(1.2-HoloGram/10,1-HoloGram/8,1.2-HoloGram/10),This:toWorld(ang(0,0,0)),vec(40) ,"hqsphere", HoloGram <= 1
- ? This : holoEntity(StartFromHolo+HoloGram - 1),255)
- }
- }
- function table tailAnim(UnShiftHoloGram:number,Smoothness:number,MaxMove:number){
- if(int(Count / 20)){
- Evel += E:velL()
- Evel *= 0.5
- 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)))
- Tail:unshiftAngle(holoEntity(UnShiftHoloGram):angles()+ang(0,0,0))
- for(O = 1,HoloGram){
- holoAng(O + UnShiftHoloGram - 1 , Tail[O,angle] ?: E:angles()+ang(0,0,0))
- holoAng(UnShiftHoloGram + 6 , Tail[O,angle]+ang(0,0,180) ?: E:angles()+ang(0,0,0))
- }
- Tail:remove(UnShiftHoloGram + 6)
- }
- }
- function angle headAngles(H){
- local AImA = (aimPosItions() - holoEntity(H):pos()):toAngle()
- return E:toWorld(clamp(E:toLocal(AImA+ang(0,0,0)),ang(-45,-100,-180),ang(45,100,180)))
- }
- function number valid(HoloN1,HoloN2){
- return holoEntity(HoloN1) & !holoEntity(HoloN2) & perf() & holoCanCreate()
- }
- function angle gunAngles(A){
- local Ayaw = (holoEntity(A):pos()-aimPosItions()):toAngle():yaw()
- return E:toWorld(ang(0,Ayaw-E:angles():yaw()+180,0))
- }
- function angle hipGunAngles(L){
- local Lpitch = (holoEntity(L):pos()-aimPosItions()):toAngle():pitch()
- return holoEntity(241):toWorld(ang(-Lpitch,0,0))
- }
- function setHoloAngles(){
- if(Driver:isValid()){
- holoAng(176,headAngles(176))
- }
- holoAng(178,holoEntity(176):mouthMovement(4))
- if(Driver:isValid() &int(Count / 20) & perf()){
- holoAng(241,gunAngles(241))
- holoAng(243,hipGunAngles(243))
- }
- }
- function toActivateFunctions(){
- if(int(Count/10)){
- grounds()
- animation()
- Seat:ifSeatIsValidEntity()
- animateFeet(MaxStepUp,StepLength)
- Seat:kick_the_bitch_out()
- #rangerPositions()
- tailAnim(158,1,15)
- setHoloAngles()
- }
- }
- Alpha = 0
- #holographic stuff#
- 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)
- holoMaterial(10000,"debug/debugdrawflat")
- c(1000,E:toWorld(vec(Front_Back,Right_Left+5,-Up_Down)),vec(1),E:toWorld(ang()),vec(255,60,0),"",None,Alpha)
- c(2000,E:toWorld(vec(Front_Back,-Right_Left-5,-Up_Down)),vec(1),E:toWorld(ang()),vec(255,60,0),"",None,Alpha)
- c(3000,E:toWorld(vec(-Front_Back,Right_Left+5,-Up_Down)),vec(1),E:toWorld(ang()),vec(255,60,0),"",None,Alpha)
- c(4000,E:toWorld(vec(-Front_Back,-Right_Left-5,-Up_Down)),vec(1),E:toWorld(ang()),vec(255,60,0),"",None,Alpha)
- }
- if(!holoEntity(Last_one) & perf()){
- if(valid(4000,21)){
- c(1,E:toWorld(vec(Front_Back,Right_Left,0)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",E,Alpha)
- c(2,holoEntity(1):toWorld(vec(0,0,FrontLegLength1/2)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",holoEntity(1),Alpha)
- c(3,holoEntity(2):toWorld(vec(0,0,FrontLegLength2/2)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",holoEntity(2),Alpha)
- c(4,E:toWorld(vec(Front_Back,-Right_Left,0)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",E,Alpha)
- c(5,holoEntity(4):toWorld(vec(0,0,FrontLegLength1/2)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",holoEntity(4),Alpha)
- c(6,holoEntity(5):toWorld(vec(0,0,FrontLegLength2/2)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",holoEntity(5),Alpha)
- c(7,E:toWorld(vec(-Front_Back,Right_Left,0)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",E,Alpha)
- c(8,holoEntity(7):toWorld(vec(BackLegLength1,0,0)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",holoEntity(7),Alpha)
- c(9,holoEntity(8):toWorld(vec(0,0,-BackLegLength2)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",holoEntity(8),Alpha)
- c(10,holoEntity(9):toWorld(vec(0,0,BackLegLength3)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",holoEntity(9),Alpha)
- c(11,E:toWorld(vec(-Front_Back,-Right_Left,0)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",E,Alpha)
- c(12,holoEntity(11):toWorld(vec(BackLegLength1,0,0)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",holoEntity(11),Alpha)
- c(13,holoEntity(12):toWorld(vec(0,0,-BackLegLength2)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",holoEntity(12),Alpha)
- c(14,holoEntity(13):toWorld(vec(0,0,BackLegLength3)),vec(1,1,1),E:toWorld(ang()),vec(155,60,0),"",holoEntity(13),Alpha)
- ik(FrontLegLength1/2,FrontLegLength2/2,holoEntity(1):pos(),holoEntity(1000):pos(),1,2,E)
- ik(FrontLegLength1/2,FrontLegLength2/2,holoEntity(4):pos(),holoEntity(2000):pos(),4,5,E)
- kinemize(E,holoEntity(7),holoEntity(8),holoEntity(9),holoEntity(3000):pos(),BackLegLength1,BackLegLength2,BackLegLength3)
- kinemize(E,holoEntity(11),holoEntity(12),holoEntity(13),holoEntity(4000):pos(),BackLegLength1,BackLegLength2,BackLegLength3)
- angleFeet(35,62,99,135)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- }
- if(valid(21,41)){
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- c(35,holoEntity(6):toWorld(vec(0,0,0)),vec(1),holoEntity(6):toWorld(ang(0,0,0)),vec(100),"",holoEntity(6),255)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- }
- if(valid(41,56)){
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- }
- if(valid(56,68)){
- 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)
- 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)
- 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)
- 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)
- 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)
- c(62,holoEntity(3):toWorld(vec(0,0,0)),vec(1),holoEntity(6):toWorld(ang(0,0,0)),vec(100),"",holoEntity(3),255)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- }
- #########
- #back legs#
- #first one#
- if(valid(68,71)){
- 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)
- 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)
- 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)
- }
- if(valid(71,74)){
- 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)
- 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)
- 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)
- }
- if(valid(74,81)){
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- }
- if(valid(81,87)){
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- }
- if(valid(87,89)){
- 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)
- 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)
- }
- if(valid(89,93)){
- 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)
- 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)
- 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)
- 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)
- }
- if(valid(93,96)){
- 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)
- 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)
- 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)
- }
- if(valid(96,104)){
- 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)
- 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)
- c(99,holoEntity(10):toWorld(vec(0,0,0)),vec(1),holoEntity(10):toWorld(ang(0,0,0)),vec(10),"",holoEntity(10),255)
- 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)
- 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)
- 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)
- 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)
- 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)
- }
- ############
- #second back leg#
- if(valid(104,110)){
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- }
- if(valid(110,117)){
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- }
- if(valid(117,122)){
- 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)
- 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)
- 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)
- 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)
- 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)
- }
- if(valid(122,129)){
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- }
- if(valid(129,132)){
- 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)
- 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)
- 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)
- }
- if(valid(132,140)){
- 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)
- 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)
- c(135,holoEntity(14):toWorld(vec(0,0,0)),vec(1),holoEntity(14):toWorld(ang(0,0,0)),vec(14),"",holoEntity(14),255)
- 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)
- 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)
- 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)
- 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)
- 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)
- }
- if(valid(140,148)){
- 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)
- 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)
- 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)
- 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)
- c(145,E:toWorld(vec(-20,0,0)),vec(2,3,2),E:toWorld(ang(0,0,0)),vec(200),"hq_rcube",E,255)
- 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)
- c(147,E:toWorld(vec(-50,0,0)),vec(2,3,2),E:toWorld(ang(0,0,0)),vec(200),"hq_rcube",E,255)
- 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)
- }
- if(valid(148,158)){
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- }
- #tail#
- if(valid(158,164)){
- holoEntity(158):generateTail(0,22,157,6)
- }
- #####
- if(valid(164,169)){
- 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)
- 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)
- 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)
- 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)
- 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)
- }
- if(valid(169,182)){
- c(170,E:toWorld(vec(82,5,10)),vec(1,1,2),E:toWorld(ang(50,-30,0)),vec(100),"hq_rcylinder",E,255)
- c(171,E:toWorld(vec(82,-5,10)),vec(1,1,2),E:toWorld(ang(50,30,0)),vec(100),"hq_rcylinder",E,255)
- 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)
- 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)
- 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)
- 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)
- c(176,E:toWorld(vec(93,-0,22)),vec(2.2),E:toWorld(ang(0,0,0)),vec(80),"hqsphere",E,255)
- 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)
- 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)
- 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)
- 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)
- 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)
- }
- #teeth#
- if(valid(182,189)){
- for(H1 = 1,7){
- 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)
- }
- }
- if(valid(189,196)){
- for(H2 = 1,7){
- 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)
- }
- }
- if(valid(196,203)){
- for(H3 = 1,8){
- 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)
- }
- }
- if(valid(203,212)){
- for(H4 = 1,8){
- 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)
- }
- }
- if(valid(212,216)){
- for(H5 = 1,4){
- 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)
- }
- }
- if(valid(216,220)){
- for(H6 = 1,4){
- 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)
- }
- }
- if(valid(220,226)){
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- }
- #sexy tail parts#
- #part1#
- if(valid(226,232)){
- for(T1 = 1,6){
- 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)
- }
- }
- ######
- #part2#
- if(valid(232,238)){
- for(T2 = 1,6){
- 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)
- }
- }
- #######
- ################
- }
- ##########
- ###############
- ###############
- #activates everything / sets the material
- Last_one = 238
- if(!holoEntity(Last_one) & !E:isFrozen()){
- E:propFreeze(1)
- }
- if(changed(holoEntity(Last_one))){
- timer("check",100)
- E:setAlpha(0)
- E:propFreeze(0)
- materialset()
- }
- if(clk("check")){
- On = 1
- timer("check2",200)
- stoptimer("check")
- }
- if(clk("check2")){
- holoMaterial(225,"debug/debugdrawflat")
- holoMaterial(226,"debug/debugdrawflat")
- stoptimer("check2")
- }
- if(On&perf()&int(Count/10)){
- toActivateFunctions()
- if(!Run){
- makeItdoSounds("npc/dog/dog_footstep"+randint(1,4)+".wav")
- }
- if(JumpActive==1){
- jumpAnim()
- }
- if(int(Count/10)){
- ik(FrontLegLength1/2,FrontLegLength2/2,holoEntity(1):pos(),holoEntity(1000):pos(),1,2,E)
- ik(FrontLegLength1/2,FrontLegLength2/2,holoEntity(4):pos(),holoEntity(2000):pos(),4,5,E)
- kinemize(E,holoEntity(7),holoEntity(8),holoEntity(9),holoEntity(3000):pos(),BackLegLength1,BackLegLength2,BackLegLength3)
- kinemize(E,holoEntity(11),holoEntity(12),holoEntity(13),holoEntity(4000):pos(),BackLegLength1,BackLegLength2,BackLegLength3)
- }
- angleFeet(35,62,99,135)
- }
- ##########################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement