@name Bomb Omb - Nix's One
@model models/hunter/misc/sphere025x025.mdl
@inputs Pod:wirelink

runOnTick(10)

E=entity()

E:applyForce(vec(0,0,20))
E:propFreeze(0)
    TarQ = quat(ang(0,90,0)) #Calculate quaternion for target orientation
                CurQ = quat(E) #Calculate current orientation quaternion
                Z = TarQ/CurQ
                EP=E:pos()
                TTV = E:toLocal(rotationVector(Z)+EP)
                E:applyTorque((150*TTV - 12*E:angVelVector())*E:inertia())

if (first())
{
    I=1
    ## 
    holoCreate(I)
    holoModel(I, "hq_icosphere")
    holoPos(I, entity():toWorld(vec(0.000, -2.240, 0.000)))
    holoAng(I, entity():toWorld(ang(0.000, 0.000, 0.000)))
    holoScale(I, vec(1.000, 1.000, 1.000))
    holoColor(I, vec(40, 36, 36), 255)
    holoParent(I, entity())


    I++
    ## 
    holoCreate(I)
    holoModel(I, "hq_rcylinder_thick")
    holoPos(I, entity():toWorld(vec(-1.675, -5.168, -3.851)))
    holoAng(I, entity():toWorld(ang(0.000, 0.000, 0.000)))
    holoScale(I, vec(0.110, 0.110, 0.500))
    holoColor(I, vec(219, 149, 20), 255)
    holoParent(I, entity())


    I++
    ## 
    holoCreate(I)
    holoModel(I, "hq_rcylinder_thick")
    holoPos(I, entity():toWorld(vec(4.660, -3.790, 0.958)))
    holoAng(I, entity():toWorld(ang(84.373, 38.655, 35.432)))
    holoScale(I, vec(0.350, 0.150, 0.245))
    holoColor(I, vec(255, 255, 255), 255)
    holoParent(I, entity())


    I++
    ## 
    holoCreate(I)
    holoModel(I, "hq_rcylinder_thick")
    holoPos(I, entity():toWorld(vec(-5.049, -2.376, 0.571)))
    holoAng(I, entity():toWorld(ang(-82.364, -0.000, 0.000)))
    holoScale(I, vec(0.120, 0.120, 0.500))
    holoColor(I, vec(219, 149, 20), 255)
    holoParent(I, entity())


    I++
    ## 
    holoCreate(I)
    holoModel(I, "hq_rcylinder_thick")
    holoPos(I, entity():toWorld(vec(0.000, 1.339, -7.169)))
    holoAng(I, entity():toWorld(ang(0.000, 0.000, 0.000)))
    holoScale(I, vec(0.467, 0.250, 0.250))
    holoColor(I, vec(226, 121, 15), 255)
    holoParent(I, entity())


    I++
    ## 
    holoCreate(I)
    holoModel(I, "hq_rcylinder_thick")
    holoPos(I, entity():toWorld(vec(0.000, -3.176, 3.567)))
    holoAng(I, entity():toWorld(ang(0.000, 0.000, 0.000)))
    holoScale(I, vec(0.050, 0.050, 1.000))
    holoColor(I, vec(255, 255, 255), 255)
    holoParent(I, entity())


    I++
    ## 
    holoCreate(I)
    holoModel(I, "hq_cubinder")
    holoPos(I, entity():toWorld(vec(0.000, -2.140, 3.646)))
    holoAng(I, entity():toWorld(ang(0.000, 0.000, 0.000)))
    holoScale(I, vec(0.500, 0.500, 0.500))
    holoColor(I, vec(150, 146, 146), 255)
    holoParent(I, entity())


    I++
    ## 
    holoCreate(I)
    holoModel(I, "hq_rcylinder_thick")
    holoPos(I, entity():toWorld(vec(-1.675, 1.228, -3.851)))
    holoAng(I, entity():toWorld(ang(0.000, 0.000, 0.000)))
    holoScale(I, vec(0.110, 0.110, 0.500))
    holoColor(I, vec(219, 149, 20), 255)
    holoParent(I, entity())


    I++
    ## 
    holoCreate(I)
    holoModel(I, "hq_torus_oldsize")
    holoPos(I, entity():toWorld(vec(-9.154, -1.919, -0.743)))
    holoAng(I, entity():toWorld(ang(88.683, -180.000, 97.564)))
    holoScale(I, vec(0.350, 0.350, 0.350))
    holoColor(I, vec(214, 121, 14), 255)
    holoParent(I, entity())


    I++
    ## 
    holoCreate(I)
    holoModel(I, "hq_rcylinder_thick")
    holoPos(I, entity():toWorld(vec(0.000, -5.173, -7.149)))
    holoAng(I, entity():toWorld(ang(0.000, 0.000, 0.000)))
    holoScale(I, vec(0.467, 0.250, 0.250))
    holoColor(I, vec(226, 121, 15), 255)
    holoParent(I, entity())


    I++
    ## 
    holoCreate(I)
    holoModel(I, "hq_torus_oldsize")
    holoPos(I, entity():toWorld(vec(-8.594, -1.981, 3.286)))
    holoAng(I, entity():toWorld(ang(88.683, -180.000, 97.564)))
    holoScale(I, vec(0.350, 0.350, 0.350))
    holoColor(I, vec(214, 121, 14), 255)
    holoParent(I, entity())
    


    I++
    ## 
    holoCreate(I)
    holoModel(I, "hq_rcylinder_thick")
    holoPos(I, entity():toWorld(vec(4.320, -0.082, 1.160)))
    holoAng(I, entity():toWorld(ang(84.373, 38.655, 35.432)))
    holoScale(I, vec(0.350, 0.150, 0.245))
    holoColor(I, vec(255, 255, 255), 255)
    holoParent(I, entity())


    I++
    entity():setAlpha(0)
}
W = Pod["W",number]
A = Pod["A",number]
S = Pod["S",number]
D = Pod["D",number]
Space = Pod["Space",number]
Shift = Pod["Shift",number]
if(changed(W)){
 E:applyForce(vec(0,500,0))   
}
