@name vechines
@inputs W A S D Space Act
interval(1)
Pr = entity():isWeldedTo()
W = 0
######################CONTROLS#########################
Act = 0
Speed = Pr:vel():x()+Pr:vel():y()+Pr:vel():z()
if(A)
{
    Pr:applyAngForce(ang(0,-1300,0))
}
if(D)
{
    Pr:applyAngForce(ang(0,1300,0))
}
if(W & $W)
{
    soundPlay(1,999,"thrusters/rocket04.wav")
    holoAng(1,ang(Speed,Pr:angles():yaw(),Pr:angles():roll()))    
}
if(W == 0)
{
    soundStop(1)
}
########################DIZAINES######################

holoCreate(1,Pr:pos() + Pr:forward() * 30 + Pr:right() * -42,vec(1,1,2))
holoModel(1,"hq_tube")
holoParent(1,Pr)
holoMaterial(1,"phoenix_storms/cube")

holoCreate(2,Pr:pos()+vec(-30,-42,0),vec(1,1,2))
holoModel(2,"hq_tube")
holoParent(2,Pr)
holoMaterial(2,"phoenix_storms/cube")

holoCreate(3,Pr:pos()+vec(-30,42,0),vec(1,1,2))
holoModel(3,"hq_tube")
holoParent(3,Pr)
holoMaterial(3,"phoenix_storms/cube")

holoCreate(4,Pr:pos()+vec(30,-42,0),vec(1,1,2))
holoModel(4,"hq_tube")
holoParent(4,Pr)
holoMaterial(4,"phoenix_storms/cube")

holoCreate(5,Pr:pos()+vec(30,42,12),vec(1,1,1))
holoModel(5,"hq_hdome")
holoMaterial(5,"phoenix_storms/stripes")
holoParent(5,1)

holoCreate(6,Pr:pos()+vec(-30,-42,12),vec(1,1,1))
holoModel(6,"hq_hdome")
holoMaterial(6,"phoenix_storms/stripes")
holoParent(6,2)

holoCreate(7,Pr:pos()+vec(-30,42,12),vec(1,1,1))
holoModel(7,"hq_hdome")
holoMaterial(7,"phoenix_storms/stripes")
holoParent(7,3)

holoCreate(8,Pr:pos()+vec(30,-42,12),vec(1,1,1))
holoModel(8,"hq_hdome")
holoMaterial(8,"phoenix_storms/stripes")
holoParent(8,4)

if (first()) {
    holoAng(5,holoEntity(1):angles())
    holoAng(6,holoEntity(2):angles())
    holoAng(7,holoEntity(3):angles())
    holoAng(8,holoEntity(4):angles())
}
