@name Holo Follower
@inputs
@outputs
@persist Player:entity Rot X X1 X2 Z Z1
@trigger

O = owner():pos()+vec(0+X1,0+X2,40+Z1)

runOnTick(1)

if(first()){
holoCreate(1)
holoModel(1,"hq_sphere")
holoScale(1,vec(2.2,2.2,2.2))
holoMaterial(1,"models/props_wasteland/rockcliff02b")
holoRenderFX(1,16)
holoPos(1,entity():pos()+vec(0,0,55))

holoCreate(2)
holoModel(2,"hq_sphere")
holoScale(2,vec(2.2,2.2,2.2))
holoMaterial(2,"models/props_wasteland/rockcliff02b")
holoRenderFX(2,16)
holoPos(2,entity():pos()+vec(0,0,55))

holoCreate(3)
holoModel(3,"hq_sphere")
holoScale(3,vec(2.2,2.2,2.2))
holoMaterial(3,"models/props_wasteland/rockcliff02b")
holoRenderFX(3,16)
holoPos(3,entity():pos()+vec(0,0,55))

holoCreate(4)
holoModel(4,"hq_sphere")
holoScale(4,vec(2.2,2.2,2.2))
holoMaterial(4,"models/props_wasteland/rockcliff02b")
holoRenderFX(4,16)
holoPos(4,entity():pos()+vec(0,0,55))

holoCreate(5)
holoModel(5,"hq_sphere")
holoScale(5,vec(2.2,2.2,2.2))
holoMaterial(5,"models/props_wasteland/rockcliff02b")
holoRenderFX(5,16)
holoPos(5,entity():pos()+vec(0,0,55))

holoCreate(6)
holoModel(6,"hq_sphere")
holoScale(6,vec(2.2,2.2,2.2))
holoMaterial(6,"models/props_wasteland/rockcliff02b")
holoRenderFX(6,16)
holoPos(6,entity():pos()+vec(0,0,55))

holoCreate(7)
holoModel(7,"hq_sphere")
holoScale(7,vec(2.2,2.2,2.2))
holoMaterial(7,"models/props_wasteland/rockcliff02b")
holoRenderFX(7,16)
holoPos(7,entity():pos()+vec(0,0,55))

holoCreate(8)
holoModel(8,"hq_sphere")
holoScale(8,vec(2.2,2.2,2.2))
holoMaterial(8,"models/props_wasteland/rockcliff02b")
holoRenderFX(8,16)
holoPos(8,entity():pos()+vec(0,0,55))
}

# Targeting
S = owner():lastSaid():explode(" ")

if(S:string(1)=="!t"){
    
    TempPlayer = findPlayerByName(S:string(2))
    if(TempPlayer:isPlayer()){
        Player = TempPlayer
    }
}

#Base Pos -The invisible middle holo-

BP = Player:pos() + vec(0,0,100)

Rot++
if(Rot > 360){Rot = 0}

Ang = ang(0,Rot,0)

#Where dah holos at
holoPos(1, BP + vec(0,-50,0):rotate(Ang))
holoPos(2, BP + vec(0,50,0):rotate(Ang))
holoPos(3, BP + vec(50,0,0):rotate(Ang))
holoPos(4, BP + vec(-50,0,0):rotate(Ang))
holoPos(5, BP + vec(35,35,0):rotate(Ang))
holoPos(6, BP + vec(-35,-35,0):rotate(Ang))
holoPos(7, BP + vec(-35,35,0):rotate(Ang))
holoPos(8, BP + vec(35,-35,0):rotate(Ang))
holoPos(1,O)
holoPos(2,O)
holoPos(3,O)
holoPos(4,O)
holoPos(5,O)
holoPos(6,O)
holoPos(7,O)
holoPos(8,O)

X++
Z+=2
X1=sin(X)*70
X2=cos(X)*70
Z1=sin(Z)*30
