@name Ghost Avatar
@inputs
@outputs
@persist 
@trigger 
O=entity()
entity():setAlpha(0)

#IS="icosphere3"
#Cone="cone"
#Cube="cube"
#Pyr="pyramid"
#Troid="torus3"
#Pla="plane"
#Tet="tetra"
#Dome2="dome2"

#Models used
Dome="dome"
Cyl="hqcylinder"

Pl=O:pos()
#colors and or size base 
B=vec(1,1,1) #Base vector
Red=vec(1,0,0)*255
Blue=vec(0,0,1)*255
White=vec(1,1,1)*255
#hologram textures used
Eyes="models/error/new light1"
Flame="models/props_combine/tpballglow"
Raven="models/props_junk/ravenholmsign_sheet"
Metal="phoenix_storms/Indenttiles_1-2"
Arms=Metal
Face="phoenix_storms/Indenttiles2"
#Defines arrays for mass hologram creation
Off=0
Holo=table() #(position-Offset,size,angle,color,model,parentID,material,clipID,ClipOrigin,ClipNormal,clipIsGlobal)
Holo:pushArray(array(vec(0,0,15),B,ang(),White,Dome,O,Metal))#main dome
Holo:pushArray(array(vec(0,0,9),vec(1,1,2)*0.75,ang(),B*128,Cyl,1,Raven))#base
Holo:pushArray(array(vec(6,3,17),B*0.2,ang(90,0,0),Red,Dome,1,Eyes)) #eye Left
Holo:pushArray(array(vec(6,-3,17),B*0.2,ang(90,0,0),Red,Dome,1,Eyes)) #eye Right
Holo:pushArray(array(vec(5,0,17+Off),vec(0.25,1,0.25),ang(90,0,0),Blue,Cyl,1,Face,1,Pl,-4,1))#Visor
Holo:pushArray(array(vec(0,7,8),vec(0.25,0.25,1),ang(),B*200,Cyl,1,Arms)) #arm left
Holo:pushArray(array(vec(0,-7,8),vec(0.25,0.25,1),ang(),B*200,Cyl,1,Arms)) #arm right
Holo:pushArray(array(vec(0,0,12.5),vec(0.25,0.25,1),ang(0,0,90),B*64,Cyl,1)) #arm left
Holo:pushArray(array(vec(0,0,0),B*0.5,ang(180,0,0),Blue,Cyl,1,Flame)) #thruster

#hologram generator
for(C=1,Holo:count()){
    H=Holo[C,array]
#    holoCreate(C,H[1,vector])
#    if(H[2,vector]){holoPos(C,H[2,vector])}
#    if(H[3,vector]){holoScale(C,H[3,vector])}
#    if(H[4,vector]){holoAng(C,H[4,angle])}
#    if(H[5,vector]){holoColor(C,H[5,vector])}
    holoCreate(C,H[1,vector]+Pl,H[2,vector],H[3,angle],H[4,vector],H[5,string])
    if(H[6,number]){holoParent(C,H[6,number])}
    if(H[6,entity]){holoParent(C,H[6,entity])} 
    if(H[7,string]){holoMaterial(C,H[7,string])}
    if(H[8,number]){ #This detects if you used clipping planes
        holoClipEnabled(C,1)
        holoClip(C,H[8,number],H[9,vector],H[10,vector],H[11,number])
    }
}
