@name Holo Generator Thingies
@inputs 
@outputs 
@persist Send:gtable Color A

runOnTick(1)
#=====================
#Basics and Settings
#=====================
#Don't exceed 30 xD
Holos = 30
Radius = 50
Speed = 5
Model = "hqtorus"
#Target where the holos will stick xD
Target = entity()
TargetPos = Target:pos()
#Don't put a number bigger than 10 at GenerationA and GenerationB
#Don't put a number smaller than 1
GenerationA = 1
GenerationB = 1
GenerationC = 1
GenerationD = 1
#260 = BLUE , 160 = GREEN , 360 = RED , 460 = ORANGE
ColorSize = 260
#Parent the holos to target? :3
ParentTarget = 1
#=====================
 E = entity()
 O = owner()
#=====================
#GTable
#=====================

Send = gTable("DATA",1)

#=====================
#Creating
#=====================

if(first()){
    Color=1
    for(I=1,Holos){
        holoCreate(I)
        holoModel(I,Model)
        holoPos(I,TargetPos+vec(0,0,50))
        
        
    }
}
timer("color",3000)
if(clk("color")){
    Color=0
}
for(I=1,Holos){
if(Color){
    A+=1
    
    ColorSizeX = ColorSize-100
    if(A>ColorSize){
        A=ColorSizeX
    }
    holoColor(I,hsv2rgb(A,1,1))
}


#=====================
#Moving
#=====================
Cos = cos(curtime()/GenerationA*Speed*I)*Radius/GenerationC
Sin = sin(curtime()/GenerationB*Speed*I)*Radius/GenerationD
CosZ = cos(curtime()*Speed*I)*Radius
holoPos(I,TargetPos+vec(Cos,Sin,CosZ/4+50))

#=====================
#Angling
#=====================
holoAng(I,Target:angles()+ang(vec(Cos,Sin,CosZ)))


if(ParentTarget==1){holoParent(I,Target)}else{holoUnparent(I)}
}
