@name 3d Scanner status 2
@persist A:array T T2
@model models/beer/wiremod/watersensor.mdl
interval(100)
#[Variables]#
T=T+1*5 T2=T2-1*5 #just visual
Range = 55 R = ranger(Range)
E = entity() O = owner()
K = 90 B = 91 Sc = 92 Ss = 93 #so I don't need to type the numbers over again
Rd = R:distance()
Rh = R:entity()
Radius = 180 Speed = 50
Cos = cos(curtime()*Speed)*Radius
Sin = sin(curtime()*Speed)*Radius
    
#[Main]#
if(first()){
    holoCreate(Ss)
    holoScale(Ss,vec(0.4,0.4,0.4))
    holoModel(Ss,"models/props_junk/sawblade001a.mdl")
    holoPos(Ss,E:pos())
    holoCreate(Sc)
    holoScale(Sc,vec(0.6,0.6,0.6))
    holoModel(Sc,"models/Items/combine_rifle_ammo01.mdl")
    holoPos(Sc,E:pos()+vec(0,0,-1))
    holoCreate(K)
    holoModel(K,"hq_cone") holoScale(K,vec(0.3,0.3,0.5))
    holoColor(K,vec(0,50,190),140)
    }
    
if(changed(Rd)){
holoPos(K,E:pos()+vec(0,0,Rd-5))
}

if(R:hit()){
    holoCreate(B)
    holoPos(B,Rh:boxCenterW()) holoScale(B,Rh:boxSize()/11)
    holoAng(B,Rh:angles()) holoColor(B,vec(0,190,50),140)
}else{
holoDelete(B)
}
#[Debug]#
holoPos(Ss,E:pos())
holoPos(Sc,E:pos()+vec(0,0,-1))
holoAng(Sc,ang(0,T,0))
holoAng(Ss,ang(0,T2,0))
if(changed(Rh)){print(Rh)}
