@name Find It
@persist But:array E:entity Ang:angle Dis
@trigger all
interval(100)

findByModel("models/props_lab/powerbox02b.mdl")
But = findToArray()

setName("Find It ["+But:count()+"]["+round(Dis)+"]")

if(first() | duped()){
E = entity()

holoCreate(1)
holoModel(1,"cube")
holoScaleUnits(1,vec(5,1,1))
holoPos(1,E:toWorld(vec(0,0,10))) 
holoParent(1,E) 
 
}

Dis = holoEntity(1):pos():distance(But[1,entity]:pos())
Ang = (holoEntity(1):pos() - But[1,entity]:pos()):toAngle()
holoAng(1,Ang)


