Code:
@name Shoulder Cannon by Razor[PL]
@inputs Target:entity
@outputs Bawlz:array
@persist Attack Del
interval(10)
Attack=owner():keyAttack1()
Del=owner():keyUse()
if(Attack&$Attack&owner():weapon():type()=="weapon_physcannon")
{
#holoEntity(3):soundPlay(3 * 2, 0, "ambient/energy/weld2.wav")
Ent = propSpawn("models/hunter/misc/sphere025x025.mdl",0)
Ent:noCollide(owner())
Ent:setPos(owner():toWorld(vec(0,0,60))+owner():eye()*(Ent:radius()+100))
Ent:setMass(50000)
Ent:setMaterial("models/shiny")
Ent:setColor(vec(0,0,0))
Ent:propGravity(0)
Ent:setTrails(3,70,0.5,"trails/plasma",vec(255,255,255),255)
Ent:applyForce((owner():eye()*1000000000)*Ent:mass())
Bawlz:pushEntity(Ent)
holoEntity(3):soundPlay(3* 2, 0, "HL1/ambience/particle_suck1.wav")
}
timer("Del",25000)
if(clk("Del"))
{
Bawlz:shiftEntity():propDelete()
}
if(Del&$Del)
{
for(I=1,Bawlz:count())
{
Bawlz:shiftEntity():propDelete()
hint("Prop Deleted",2)
}
}
if(Attack&$Attack&owner():weapon():type()=="weapon_crowbar")
{
#holoEntity(3):soundPlay(3 * 2, 0, "ambient/energy/weld2.wav")
Ent = propSpawn("models/props_junk/harpoon002a.mdl",0)
Ent:noCollide(owner())
Ent:setPos(owner():toWorld(vec(0,0,60))+owner():eye()*(Ent:radius()+100))
Ent:setMass(50000)
Ent:setMaterial("models/shiny")
Ent:setColor(vec(0,0,0))
Ent:propGravity(0)
#Ent:setTrails(3,70,0.5,"trails/plasma",vec(255,255,255),255)
Ent:applyForce((owner():eye()*1000000000)*Ent:mass())
Bawlz:pushEntity(Ent)
#holoEntity(3):soundPlay(3* 2, 0, "HL1/ambience/particle_suck1.wav")
}
timer("Del",25000)
if(clk("Del"))
{
Bawlz:shiftEntity():propDelete()
}
if(Del&$Del)
{
for(I=1,Bawlz:count())
{
Bawlz:shiftEntity():propDelete()
hint("Prop Deleted",2)
}
}
holoAng(3,(owner():aimPos()-holoEntity(3):pos()):toAngle())
holoParent(1,2)
#holoAng(7,(owner():aimPos()-holoEntity(7):pos()):toAngle())
holoAng(8,owner():eyeAngles()+ang(90,0,0))
if(first())
{
#concmd("wire_holograms_block_client Razor[PL]") #It hides all your holo's! only for you, anyone else can see them, you need to change the Razor[PL] to your nick
Pos=owner():attachmentPos("chest")-owner():pos()+owner():toWorld(vec(0,-1,0))
Ang=owner():attachmentAng("head") #Ang=owner():attachmentAng("head")-owner():angles()+owner():toWorld(ang())
#######PROBLEMS HERE########
Pos2=owner():attachmentPos("eyes")-owner():pos()+owner():toWorld(vec(0,-1,0))
Pos3=owner():attachmentPos("head")-owner():pos()+owner():toWorld(vec(0,-1,0))
Ang2=owner():eyeAngles()
holoCreate(2)
holoModel(2,"hqsphere")
holoPos(2,Pos+(vec(-1,-4,6)))
holoAng(2,Ang)
holoScale(2,vec(0.5,0.5,0.5))
holoParentAttachment(2,owner(),"chest")
holoCreate(1)
holoModel(1,"square")
holoPos(1,Pos+(vec(0,-6,11)))
holoAng(1,Ang+ang(-70,-42,0))
holoScale(1,vec(0.8,0.2,0.2))
holoParent(1,2)
holoCreate(3)
holoModel(3,"hqcylinder")
holoPos(3,Pos +vec(4,-7,15.9))
#holoAng(3,owner():eyeAngles())
holoAng(3,(owner():aimPos()-holoEntity(2):pos()):toAngle())
holoScale(3,vec(0.4,0.4,0.4))
holoParent(3,2)
holoCreate(4)
holoModel(4,"square")
holoPos(4,Pos+vec(1,-7,16))
holoAng(4,Ang+ang(90,0,0))
holoScale(4,vec(0.35,0.35,0.5))
holoParent(4,3)
holoCreate(5)
holoModel(5,"square")
holoPos(5,Pos+vec(-2,-7,15.89))
holoAng(5,Ang+ang(0,0,0))
holoScale(5,vec(0.8,0.25,0.25))
holoParent(5,4)
holoCreate(6)
holoModel(6,"prism")
holoPos(6,Pos+vec(-6,-7,16))
holoAng(6,Ang+ang(0,0,0))
holoScale(6,vec(0.8,0.25,0.25))
holoParent(6,4)
holoCreate(8)
holoModel(8,"hqcylinder")
holoPos(8,Pos3 +vec(6,0,0))
holoColor(8,vec4(255,255,255,255))
holoScale(8,vec(0.1,0.1,0.1))
holoParent(8,2)
holoCreate(7)
holoModel(7,"hqcylinder2")
holoPos(7,Pos2)#+vec(180,0,0))
holoAng(7,Ang2)
holoColor(7,vec4(255,0,0,100))
holoScale(7,vec(180,0.05,0.05))
holoParent(7,8)
}
if(owner():keyAttack2())
{
owner():setMaterial("models/shadertest/predator.mdl")
holoMaterial(1,"models/shadertest/predator.mdl")
holoMaterial(2,"models/shadertest/predator.mdl")
holoMaterial(3,"models/shadertest/predator.mdl")
holoMaterial(4,"models/shadertest/predator.mdl")
holoMaterial(5,"models/shadertest/predator.mdl")
holoMaterial(6,"models/shadertest/predator.mdl")
owner():weapon():setAlpha(0)#:setMaterial("models/shadertest/predator.mdl")
}
else
{
owner():setMaterial("")
owner():weapon():setMaterial("")
holoMaterial(1,"")
holoMaterial(2,"")
holoMaterial(3,"")
holoMaterial(4,"")
holoMaterial(5,"")
holoMaterial(6,"")
}
if (last())
{
concmd("wire_holograms_unblock_client Razor[PL]") #if you delete the E2 it will unblock all your holo's... you need to change the Razor[PL] to your nick
}
This code requires Prop core. I know the code is pretty messy but well it works, and you know... only stupid people clean up... genious overwhelm the chaos. Sorry for my bad english.([img][/img] didn't work)
Bookmarks