Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name ScoutW
- @inputs
- @outputs
- @persist [E Dri Seat P1 P2]:entity U Mode
- @trigger
- @model models/hunter/blocks/cube075x075x025.mdl
- # # # # # # # # # # # # # # # # # # # # # # # # #
- # BY ARKiSS 19.10.2021 #
- # # # # # # # # # # # # # # # # # # # # # # # # #
- O = owner()
- Z = O:keyPressed("z")
- Dri = Seat:driver()
- W = Dri:keyForward()
- S = Dri:keyBack()
- A = Dri:keyLeft()
- D = Dri:keyRight()
- Space = Dri:keyJump()
- Alt = Dri:keyWalk()
- M1 = Dri:keyAttack1()
- interval(10)
- if(first())
- {
- E = entity()
- E:setAlpha(0)
- E:setMass(100)
- E:propGravity(0)
- E["Health",number] = 100
- E["Speed",number] = 250
- if(!Seat)
- {
- Seat = seatSpawn("models/nova/airboat_seat.mdl",0)
- Seat:setPos(E:toWorld(vec(-5,0,5)))
- Seat:setAng(E:toWorld(ang(0,-90,0)))
- Seat:setMass(0)
- Seat:setMaterial("phoenix_storms/concrete1")
- Seat:setColor(vec(40))
- }
- timer("parent",300)
- function void holo(I:number,P:vector,S:vector,C:vector,M:string,Ent:entity)
- {
- holoCreate(I)
- holoPos(I,P)
- holoScale(I,S)
- holoColor(I,C)
- holoModel(I,M)
- holoParent(I,Ent)
- }
- holo(1,E:toWorld(vec(-120,6.8,2)),vec(0.8,0.9,1.0),vec(40),"models/xqm/jetbody3_s2.mdl",E)
- holoClipEnabled(1,1)
- holoClip(1,vec(0,-10,0),vec(0,-1,0),0)
- holoAng(1,E:toWorld(ang(0,90,0)))
- holo(2,E:toWorld(vec(-139,0.5,3)),vec(2.4,4.9,1.7),vec(40),"models/mechanics/robotics/d1.mdl",E)
- holoAng(2,E:toWorld(ang(0,90,0)))
- #holoMaterial(2,"models/shiny")
- holoEntity(2):setSubMaterial(2,"models/segment/segment_skin")
- holo(3,E:toWorld(vec(-145,0.5,23)),vec(1.7,4.5,2.3),vec(20),"models/mechanics/robotics/g1.mdl",E)
- holoAng(3,E:toWorld(ang(0,90,0)))
- holoMaterial(3,"models/segment/segment_skin")
- holo(4,E:toWorld(vec(-171,16.5,3)),vec(0.755,0.7,1.4),vec(100),"models/xqm/afterburner1medium.mdl",E)
- holoAng(4,E:toWorld(ang(0,90,-90)))
- holo(5,E:toWorld(vec(-171,-16.5,3)),vec(0.755,0.7,1.4),vec(100),"models/xqm/afterburner1medium.mdl",E)
- holoAng(5,E:toWorld(ang(0,90,-90)))
- holo(6,E:toWorld(vec(-100,0,0.8)),vec(4.5,6.4,2.65),vec(10),"hq_sphere",E)
- holoMaterial(6,"models/segment/segment_skin")
- holoDisableShading(6,1)
- holo(7,E:toWorld(vec(-60,61,5)),vec(3.5,2.5,2.5),vec(30),"models/xqm/jettailpiece1.mdl",E)
- holoAng(7,E:toWorld(ang(90,90,0)))
- holoMaterial(7,"models/segment/segment_skin")
- holo(8,E:toWorld(vec(-60,-61,5)),vec(3.5,2.5,2.5),vec(30),"models/xqm/jettailpiece1.mdl",E)
- holoAng(8,E:toWorld(ang(-90,90,0)))
- holoMaterial(8,"models/segment/segment_skin")
- # # # # # # # # # # # # # # # # INTERFACE # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- holo(9,E:toWorld(vec(42,0,15)),vec(3,2.85,2),vec(30),"hq_sphere",E)
- holoMaterial(9,"models/segment/segment_skin")
- holo(10,E:toWorld(vec(-55,0,28.7)),vec(0.4,0.45,0.8),vec(255),"models/props_combine/masterinterface.mdl",E)
- holoAng(10,E:toWorld(ang(265,-180,0)))
- holoClipEnabled(10,1)
- holoClip(10,vec(-10,0,0),vec(1,0,0),0)
- soundPlay("forw",0,"thrusters/rocket00.wav")
- holo(11,E:toWorld(vec(18,0,23)),vec(0.5),vec(0),"models/sprops/trans/misc/gauge_3.mdl",E)
- holoAng(11,E:toWorld(ang(-60,180,0)))
- holoSkin(11,4)
- holoCreate(12,E:toWorld(vec(17.5,0,23.5)))
- holoScale(12,vec(0.02))
- holoColor(12,vec(155,0,0))
- holoModel(12,"hq_sphere")
- holoAng(12,E:toWorld(ang(60,0,-180)))
- holoParent(12,E)
- holoCreate(13,holoEntity(12):toWorld(vec(0,0,1.3)))
- holoScale(13,vec(0.005,0.005,0.2))
- holoColor(13,vec(155,0,0))
- holoAng(13,holoEntity(12):toWorld(ang(0,0,0)))
- holoParent(13,12)
- # # # # # # # # # # # # # # # # EFFECT # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- holo(14,E:toWorld(vec(-150.5,18,0)),vec(0.3,0.3,0.4),vec(255),"models/effects/vol_light64x256.mdl",E)
- holoAng(14,E:toWorld(ang(0,-90,-90)))
- holo(15,E:toWorld(vec(-150.5,-16,0)),vec(0.3,0.3,0.4),vec(255),"models/effects/vol_light64x256.mdl",E)
- holoAng(15,E:toWorld(ang(0,-90,-90)))
- holo(16,E:toWorld(vec(-150.5,18,0)),vec(0.4,0.4,0.3),vec(255),"models/effects/vol_light64x256.mdl",E)
- holoAng(16,E:toWorld(ang(0,-90,-90)))
- holo(17,E:toWorld(vec(-150.5,-16,0)),vec(0.4,0.4,0.3),vec(255),"models/effects/vol_light64x256.mdl",E)
- holoAng(17,E:toWorld(ang(0,-90,-90)))
- holo(18,holoEntity(7):toWorld(vec(-2,-22,-15)),vec(2,1,1),vec(255),"models/weapons/w_mach_m249para.mdl",holoEntity(7))
- holoAng(18,holoEntity(7):toWorld(ang(0,-90,270)))
- holo(19,holoEntity(8):toWorld(vec(2,-22,-15)),vec(2,1,1),vec(255),"models/weapons/w_mach_m249para.mdl",holoEntity(8))
- holoAng(19,holoEntity(8):toWorld(ang(0,-90,90)))
- holo(20,E:toWorld(vec(25,0,42)),vec(1,1,1),vec(255),"hq_cube",E)
- holoAlpha(20,120)
- holoColor(20,vec(255,255,0))
- holoAng(20,E:toWorld(ang(0,-90,90)))
- holo(21,E:toWorld(vec(25,3,42.7)),vec(0.05),vec(255),"models/sprops/misc/alphanum/alphanum_h.mdl",E)
- holoAng(21,E:toWorld(ang(0,-90,0)))
- holoAlpha(21,120)
- holoColor(21,vec(255,255,0))
- holo(22,E:toWorld(vec(25,2,42.7)),vec(0.05),vec(255),"models/sprops/misc/alphanum/alphanum_p.mdl",E)
- holoAng(22,E:toWorld(ang(0,90,0)))
- holoAlpha(22,120)
- holoColor(22,vec(255,255,0))
- holo(23,E:toWorld(vec(25,1.5,42.7)),vec(0.05),vec(255),"models/sprops/misc/alphanum/alphanum_colon.mdl",E)
- holoAng(23,E:toWorld(ang(0,90,0)))
- holoAlpha(23,120)
- holoColor(23,vec(255,255,0))
- holo(24,E:toWorld(vec(-5,1.5,20)),-vec(5,7,5),vec(200,0,0),"hq_sphere",E)
- holoAng(24,E:toWorld(ang(0,90,0)))
- holoAlpha(24,0)
- holoDisableShading(20,1)
- holoDisableShading(21,1)
- holoDisableShading(22,1)
- holoDisableShading(23,1)
- holoDisableShading(24,1)
- P1 = propSpawn("models/hunter/blocks/cube075x075x025.mdl",holoEntity(7):toWorld(vec(0,0,0)),holoEntity(7):toWorld(ang(90,0,0)),0)
- P2 = propSpawn("models/hunter/blocks/cube075x075x025.mdl",holoEntity(8):toWorld(vec(0,0,0)),holoEntity(8):toWorld(ang(90,0,0)),0)
- P1:setMass(0) P2:setMass(0)
- P1:setParent(E) P2:setParent(E)
- holoParent(7,P1)
- holoParent(8,P2)
- P1:setAlpha(0) P2:setAlpha(0)
- Mode = 1
- }
- # # # # # # # # # # # # # # # # ENGiNE PART # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
- holoVisible(20,players(),0)
- holoVisible(21,players(),0)
- holoVisible(22,players(),0)
- holoVisible(23,players(),0)
- holoVisible(24,players(),0)
- holoVisible(20,Seat:driver(),1)
- holoVisible(21,Seat:driver(),1)
- holoVisible(22,Seat:driver(),1)
- holoVisible(23,Seat:driver(),1)
- holoVisible(24,Seat:driver(),1)
- if(Mode == 1)
- {
- applyForce(E:forward()*((W-S) * E["Speed",number]*20) - E:toWorldAxis(E:velL() * vec(0.015,0.5020125,0.245))*E:mass())
- applyForce(E:up()*E:mass()*20*(Space-Alt)*10)
- holoScaleUnits(20,vec(E["Health",number]/10,0.3,0.3))
- if(E["Health",number]<=50){ holoColor(20,vec(0,255,0)) }
- if(E["Health",number]<=25){ holoColor(20,vec(255,0,0)) }
- rangerFilter(Seat)
- rangerFilter(E)
- rangerFilter(players())
- DW = rangerOffset(30,E:pos(),-E:up())
- if(DW:hit()){ applyForce(E:up()*80*E:mass())}
- Y=vec(Dri:eye():dot(E:right()),Dri:eye():dot(E:right()),0):y()
- P=vec(0,Dri:eye():dot(E:up()),Dri:eye():dot(E:up())):z()
- applyAngForce(ang(-P,-Y,(D-A))*100*E:mass()-E:angVel()*E:mass())
- if(E:getDamage())
- {
- E["Health",number] = E["Health",number] - 1
- holoAlpha(24,150)
- }else{timer("lat",100)}
- if(clk("lat")){ holoAlpha(24,0) stoptimer("lat")}
- if(W)
- {
- U++
- particleBounce(0)
- particleGravity(vec())
- #particle(1,20,0,"particle/warp1_warp",vec(255),holoEntity(14):pos(),vec())
- particle(0.3,22,0,"particle/warp1_warp",vec(255),holoEntity(14):pos(),vec(),0,0,255,0)
- particle(0.3,22,0,"particle/warp1_warp",vec(255),holoEntity(15):pos(),vec(),0,0,255,0)
- #particle(1,20,0,"particle/warp1_warp",vec(255),holoEntity(15):pos(),vec())
- }
- else{ U-- }
- if(U>=5){ U=5 } if(U<=0){ U = 0 }
- holoAlpha(14,U)
- holoAlpha(15,U)
- holoAlpha(16,U)
- holoAlpha(17,U)
- holoAng(14,E:toWorld(ang(-curtime()*1000,-90,-90)))
- holoAng(15,E:toWorld(ang(curtime()*1000,-90,-90)))
- if(E:velL():x()>=0)
- {
- holoAng(12,E:toWorld(ang(60,0,-180+clamp(E:velL():x()/3.15,0,320))))
- }
- if(E:velL():x()<0)
- {
- holoAng(12,E:toWorld(ang(60,0,-180+clamp(-E:velL():x()/3.15,0,320))))
- }
- if(M1)
- {
- timer("atk",200)
- }
- if(clk("atk"))
- {
- holoEntity(18):shootTo(holoEntity(18):pos(),holoEntity(18):forward(),0,90,50,"HelicopterTracer")
- holoEntity(19):shootTo(holoEntity(19):pos(),holoEntity(19):forward(),0,90,50,"HelicopterTracer")
- soundPlay("atk",0,"weapons/alyx_gun/alyx_gun_fire6.wav")
- }
- soundPitch("forw",abs(E:velL():x())/1.5*0.1+40)
- }
- else
- {
- holoAlpha(14,0)
- holoAlpha(15,0)
- holoAlpha(16,0)
- holoAlpha(17,0)
- }
- if(E["Health",number]<=0)
- {
- Mode = 0
- E["Speed",number] = 0
- E:propGravity(1)
- P1:propGravity(1)
- P1:setMass(500)
- P1:applyForce(P1:up()*P1:mass())
- P1:unParent()
- P2:propGravity(1)
- P2:setMass(500)
- P2:applyForce(P2:up()*P2:mass())
- P2:unParent()
- }
- if(E["Health",number]<=25)
- {
- E["Speed",number] = 50
- holoEntity(18):remove()
- P1:propGravity(1)
- P1:setMass(500)
- P1:unParent()
- particleBounce(0)
- particleGravity(vec(0,0,-1))
- particle(1,0,210,"particle/smokesprites_0001",vec(30),E:pos(),E:up()*110+randvec(-100,100),0,0,255,0)
- particle(0.5,50,0,"particles/flamelet2",vec(255,255,0),E:pos(),E:up()*150+randvec(-30,30),10,0,100,0)
- }
- if(changed(E["Health",number]<=5)&E["Health",number]<=5)
- {
- soundPlay("al",1,"npc/turret_floor/alert.wav")
- }
- if(clk("parent"))
- {
- Seat:setParent(E)
- E:propFreeze(0)
- stoptimer("parent")
- }
- if(Mode == 0)
- {
- soundPurge()
- E:effectSpawn("Explosion",E:pos(),vec(300))
- P1:remove()
- P2:remove()
- timer("dest",500)
- }
- if(clk("dest"))
- {
- selfDestructAll()
- }
- if(Z){ propDeleteAll() selfDestruct()}
- setName("Scout-W by Arkiss")
Advertisement
Add Comment
Please, Sign In to add comment