################
# > Cube Followers: Some holographic cubes that will encircle you.
# > How to use: Spawn it.
################

@name Cube Followers
@persist T

interval(30)

T=T*1+3
A=cos(T)
B=sin(T)
C=(realtime() * 50)

holoCreate(0)
holoScale(0, vec(2,2,2))
holoParent(0, entity():owner())
holoColor(0, vec(255,0,0))
holoAlpha(0, 200)
holoAng(0, ang(C,C,C))
holoPos(0, entity():owner():toWorld(vec(A*50,B*50,40)))

holoCreate(1)
holoScale(1, vec(2,2,2))
holoParent(1, entity():owner())
holoColor(1, vec(0,255,0))
holoAlpha(1, 200)
holoAng(1, ang(C,C,C))
holoPos(1, entity():owner():toWorld(vec(0,A*50,(B*50)+40)))

holoCreate(2)
holoScale(2, vec(2,2,2))
holoParent(2, entity():owner())
holoColor(2, vec(0,0,255))
holoAlpha(2, 200)
holoAng(2, ang(C,C,C))
holoPos(2, entity():owner():toWorld(vec(A*50,0,(B*50)+40)))

holoCreate(3)
holoScale(3, vec(2,2,2))
holoParent(3, entity():owner())
holoColor(3, vec(255,0,0))
holoAlpha(3, 200)
holoAng(3, ang(C,C,C))
holoPos(3, entity():owner():toWorld(vec(0-(A*50),0-(B*50),40)))

holoCreate(4)
holoScale(4, vec(2,2,2))
holoParent(4, entity():owner())
holoColor(4, vec(0,255,0))
holoAlpha(4, 200)
holoAng(4, ang(C,C,C))
holoPos(4, entity():owner():toWorld(vec(0,0-(A*50),0-((B*50)-40))))

holoCreate(5)
holoScale(5, vec(2,2,2))
holoParent(5, entity():owner())
holoColor(5, vec(0,0,255))
holoAlpha(5, 200)
holoAng(5, ang(C,C,C))
holoPos(5, entity():owner():toWorld(vec(0-(A*50),0,0-(B*50)+40)))
