################
# > Flag Dutch: The dutch flag floating above your head.
# > How to use: Spawn it. It will be above your head.
################

@name The Dutch Flag :D
@persist I A Target:entity Scale

interval(10)

if (first()|duped()) {
    Scale = 10
    
    # Red / White / Blue
    holoCreate(1)
    holoScale(1,vec(3,0.3,2/3)*Scale)
    holoColor(1,vec(33,70,139))
    holoPos(1,entity():pos()+vec(0,0,(2/3)*12)*Scale)
    
    holoCreate(2)
    holoScale(2,vec(3,0.3,2/3)*Scale)
    holoPos(2,entity():pos()+vec(0,0,((2/3)*12)*2)*Scale)
    
    holoCreate(3)
    holoScale(3,vec(3,0.3,2/3)*Scale)
    holoColor(3,vec(174,28,40))
    holoPos(3,entity():pos()+vec(0,0,((2/3)*12)*3)*Scale)
    
    holoParent(2,holoEntity(1))
    holoParent(3,holoEntity(1))
    
    Target=owner()
}

A+=1
Z=sin(A)*(5+Scale)

holoAng(1,ang(0,A,0))
holoPos(1,Target:pos()+vec(0,0,(83+Z)+Scale*12))
