@name Cenns ACF cannon E2
@inputs 
@outputs Active Fire Reload Unload
@persist H:entity E:entity
@inputs JJ:entity GG:entity
@trigger 

if(first()|dupefinished()){
    E = entity()
    H = E:isWeldedTo()
    Fire = 0
    Active = 1
    
    Unload = 1
    Reload = 1
holoCreate(1)
holoParent(1,JJ)

}
interval(1)
holoPos(1,JJ:pos() + vec(0,-75,130))
H:setPos(holoEntity(1):pos())
if(owner():keyZoom()){
    E:setAng(owner():eyeAngles())
H:setAng(owner():eyeAngles())
Active = 1}
else{Active=0}
if(owner():keyUse()){
    Fire = 1
    timer("fire",500)
        timer("reload",2000)
}

if(clk("fire")){Fire = 0}
if(clk("reload")){Reload = 1
    timer("reload2",1000)}
if(clk("reload2")){Reload = 0}

