@name mortar
@inputs 
@outputs 
@persist 
@trigger 
interval(10)

Target = find()
User = owner()
AimPos = User:aimPos()
Fire = User:keyUse()
RedDot = holoEntity(1):pos()
UserEye = User:eye()

holoCreate(1)
holoModel(1, "hqsphere")
holoPos(1, AimPos)
holoScale(1, vec(0.5,0.5,0.5))
holoColor(1, vec(255,0,0))

if(changed(Fire) & Fire == 1)
{
    E = propSpawn("models/props_c17/oildrum001_explosive.mdl",RedDot+vec(0,0,1000),0)   
    E:applyForce(vec(0,0,50)*-5000)
    E:setTrails(500,500,500, "trails/smoke",vec(50,50,50),255,255,255)
    
    E2 = propSpawn("models/props_c17/oildrum001_explosive.mdl",RedDot+vec(0,0,1000),0)   
    E2:applyForce(vec(0,0,50)*-5000)
    E2:setTrails(500,500,500, "trails/smoke",vec(50,50,50),255,255,255)
    
    E3 = propSpawn("models/props_c17/oildrum001_explosive.mdl",RedDot+vec(0,0,1000),0)   
    E3:applyForce(vec(0,0,50)*-5000)
    E3:setTrails(500,500,500, "trails/smoke",vec(50,50,50),255,255,255)
    
    E4 = propSpawn("models/props_c17/oildrum001_explosive.mdl",RedDot+vec(0,0,1000),0)   
    E4:applyForce(vec(0,0,50)*-5000)
    E4:setTrails(500,500,500, "trails/smoke",vec(50,50,50),255,255,255)
    
    E7 = propSpawn("models/props_c17/oildrum001_explosive.mdl",RedDot+vec(0,0,1000),0)   
    E7:applyForce(vec(0,0,50)*-5000)
    E7:setTrails(500,500,500, "trails/smoke",vec(50,50,50),255,255,255)
    
    E8 = propSpawn("models/props_c17/oildrum001_explosive.mdl",RedDot+vec(0,0,1000),0)   
    E8:applyForce(vec(0,0,50)*-5000)
    E8:setTrails(500,500,500, "trails/smoke",vec(50,50,50),255,255,255)
    
    E9 = propSpawn("models/props_c17/oildrum001_explosive.mdl",RedDot+vec(0,0,1000),0)   
    E9:applyForce(vec(0,0,50)*-5000)
    E9:setTrails(500,500,500, "trails/smoke",vec(50,50,50),255,255,255)
    
    E10 = propSpawn("models/props_c17/oildrum001_explosive.mdl",RedDot+vec(0,0,1000),0)   
    E10:applyForce(vec(0,0,50)*-5000)
    E10:setTrails(500,500,500, "trails/smoke",vec(50,50,50),255,255,255)
    
    E11 = propSpawn("models/props_phx/misc/flakshell_big.mdl",RedDot+vec(0,0,50),0)   
    E11:setTrails(500,500,500, "trails/smoke",vec(50,50,50),255,255,255)
    
    E12 = propSpawn("models/props_phx/misc/flakshell_big.mdl",RedDot+vec(0,0,50),0)   
    E12:setTrails(500,500,500, "trails/smoke",vec(50,50,50),255,255,255)
    
    E13 = propSpawn("models/props_phx/misc/flakshell_big.mdl",RedDot+vec(0,0,50),0)   
    E13:setTrails(500,500,500, "trails/smoke",vec(50,50,50),255,255,255)
    
    
}
