@name DERPDERPDERPLOLOL
@persist E:entity HOLO_INDEX
@trigger all

# ui/gamestartup11.mp3 -> 40
if(first() || duped()){
    runOnTick(1)
    
    E = entity()
    
    function void createHolo(Model:string,Scl:vector,Pos:vector,Ang:angle,Color:vector,Mat:string){

         holoCreate(HOLO_INDEX)
         holoModel(HOLO_INDEX,Model)
         holoPos(HOLO_INDEX,Pos)
         holoAng(HOLO_INDEX,Ang)
         holoScale(HOLO_INDEX,Scl)
         holoParent(HOLO_INDEX,E)
         holoColor(HOLO_INDEX,Color)
         holoMaterial(HOLO_INDEX,Mat)

         HOLO_INDEX+=1
   }

    createHolo("plane",vec(23),E:toWorld(vec(0,0,0.2)),E:toWorld(ang(0)),vec(255),"expression 2/cog_prop")
    createHolo("plane",vec(23),E:toWorld(vec(0,0,0.2)),E:toWorld(ang(0)),vec(255,0,0),"expression 2/cog_prop")
    
    createHolo("hq_tube_thin",vec(5,5,0.025)*5,E:toWorld(vec(0,0,0)),E:toWorld(ang(0)),vec(40),"models/debug/debugwhite")
    createHolo("hq_cylinder",vec(5,5,0.01)*4.95,E:toWorld(vec(0,0,-1.85)),E:toWorld(ang(0.35,0,0)),vec(40),"models/debug/debugwhite")
    createHolo("cube",vec(5,0.2,0.025)*5,E:toWorld(vec(0,0,0)),E:toWorld(ang(0,90,0)),vec(40),"models/debug/debugwhite")
    
    createHolo("hq_tube",vec(1.8,1.8,0.025)*5,E:toWorld(vec(0,0,1)),E:toWorld(ang(0)),vec(40),"")
    createHolo("hq_cylinder",vec(1.8,1.8,0.015)*4.5,E:toWorld(vec(0,0,1)),E:toWorld(ang(0)),vec(200),"")
    
    createHolo("hq_tube",vec(1.8,1.8,0.025)*5,E:toWorld(vec(0,0,1)),E:toWorld(ang(0)),vec(40),"")
    
    # Clipping
    holoClipEnabled(0,1,1)
    holoClipEnabled(1,1,1)
    
}

###############
## E2 EFFECT ##
###############

holoAng(1,holoEntity(1):toWorld(ang(0,-ops()*45 / maxquota(),0)))
holoAng(0,holoEntity(0):toWorld(ang(0,-(ops()*45 / maxquota()),0)))
holoClip(1,1,holoEntity(1):pos(),E:forward(),1)
holoClip(0,1,holoEntity(0):pos(),-E:forward(),1)
