@name Dragon Wing Test
@persist N L1 L2 L3 O
@model models/hunter/blocks/cube05x05x05.mdl
if(first())
{
    runOnTick(1)
    
    O = 16
    L1 = 100
    L2 = 100
    L3 = 50
    #Joints
    holoCreate(1,entity():toWorld(vec(0,O,0)))
    holoAng(1,entity():toWorld(ang(90,90,0)))
    holoParent(1,entity())
    holoCreate(2,holoEntity(1):toWorld(vec(0,0,L1)))
    holoAng(2,holoEntity(1):toWorld(ang()))
    holoParent(2,1)
    holoCreate(3,holoEntity(2):toWorld(vec(0,0,L2)))
    holoAng(3,holoEntity(2):toWorld(ang()))
    holoParent(3,2)
    holoCreate(4,holoEntity(3):toWorld(vec(0,0,L3)))
    holoAng(4,holoEntity(3):toWorld(ang()))
    holoParent(4,3)
    #Segs
    holoCreate(10,holoEntity(1):toWorld(vec(0,0,L1*0.5)))
    holoAng(10,holoEntity(1):toWorld(ang()))
    holoScale(10,vec(0.85,0.85,L1/12))
    holoParent(10,1)
    holoCreate(11,holoEntity(2):toWorld(vec(0,0,L2*0.5)))
    holoAng(11,holoEntity(2):toWorld(ang()))
    holoScale(11,vec(0.85,0.85,L2/12))
    holoParent(11,2)
    holoCreate(12,holoEntity(3):toWorld(vec(0,0,L3*0.5)))
    holoAng(12,holoEntity(3):toWorld(ang()))
    holoScale(12,vec(0.85,0.85,L3/12))
    holoParent(12,3)
    
    #Joints
    holoCreate(5,entity():toWorld(vec(0,-O,0)))
    holoAng(5,entity():toWorld(ang(90,90,0)))
    holoParent(5,entity())
    holoCreate(6,holoEntity(5):toWorld(vec(0,0,L1)))
    holoAng(6,holoEntity(5):toWorld(ang()))
    holoParent(6,5)
    holoCreate(7,holoEntity(6):toWorld(vec(0,0,L2)))
    holoAng(7,holoEntity(6):toWorld(ang()))
    holoParent(7,6)
    holoCreate(8,holoEntity(7):toWorld(vec(0,0,L3)))
    holoAng(8,holoEntity(7):toWorld(ang()))
    holoParent(8,7)
    #Segs
    holoCreate(20,holoEntity(5):toWorld(vec(0,0,L1*0.5)))
    holoAng(20,holoEntity(5):toWorld(ang()))
    holoScale(20,vec(0.85,0.85,L1/12))
    holoParent(20,5)
    holoCreate(21,holoEntity(6):toWorld(vec(0,0,L2*0.5)))
    holoAng(21,holoEntity(6):toWorld(ang()))
    holoScale(21,vec(0.85,0.85,L2/12))
    holoParent(21,6)
    holoCreate(22,holoEntity(7):toWorld(vec(0,0,L3*0.5)))
    holoAng(22,holoEntity(7):toWorld(ang()))
    holoScale(22,vec(0.85,0.85,L3/12))
    holoParent(22,7)
    for(I=1,22)
    {
        holoColor(I,vec(100,0,100))
        holoModel(I,"models/hunter/blocks/cube025x025x025.mdl")
        holoMaterial(I,"models/shiny")
    }
}
N+=5
holoAng(1,entity():toWorld(ang(100+cos(N)*20,90,0)))
holoAng(2,holoEntity(1):toWorld(ang(20+cos(N)*35,0,0)))
holoAng(3,holoEntity(2):toWorld(ang(10+cos(N)*30,0,0)))

holoAng(5,entity():toWorld(ang(100+cos(N)*20,-90,0)))
holoAng(6,holoEntity(5):toWorld(ang(20+cos(N)*35,0,0)))
holoAng(7,holoEntity(6):toWorld(ang(10+cos(N)*30,0,0)))
