@name AMAZON
@persist 
@trigger all

if(first() || duped()){
 #playonce/scripted_sequences/glados_reawakened_01.wav
 holoCreate(1)
 holoModel(1,"icosphere2")
 holoParent(1,entity())
 holoScaleUnits(1,vec(170,170,170)) 
 #holoEntity(1):soundPlay(1,0,"metachievements/lightning_1.wav")
}

interval(1)
#holoPos(1,entity():toWorld(vec(cos(curtime()*100)*10,0,0)))


#ifdef raySphereIntersection(vector,vector,vector,number)
    local Tracedata = raySphereIntersection(owner():shootPos(), vec(0, 0, -1), holoEntity(1):pos(),
     holoScaleUnits(1):x() / 2)
#endif

if(Tracedata != vec() & holoEntity(1):toLocal(owner():shootPos()):z() < holoScaleUnits(1):z() / 2){
    holoColor(1,vec(255,0,0))    
}else{
    holoColor(1,vec(255,255,255))
}

holoAng(1,ang(0,0,curtime()*100))
