@name Thinking with Time Machine Chip ~ Werefox
@inputs Record Play
@outputs T 
@persist F:string H:vector Pos:array OPos:vector J:number Potato Potato2 B:array Ang:array
@trigger 
if(owner():lastSaid()=="!c"){
    concmd("say ~~Restarting my fucking e2~~")
timer("reset",2000)
}
if(clk("reset")){reset()}

if(first()){
    F = owner():model()
holoCreate(1)
holoModel(1,F)
Potato2 = 1
#holoAlpha(1,0)
T = 0
}

interval(1)
if(Record==1){
if(Play==0){
if(Potato2==1){
Potato = 1
}
    T = T + 1
    H = owner():pos()
    A = owner():angles()
    Pos:setVector(T,H)
    Ang:setAngle(T,A)
    
}
}
if(changed(T)){
    if(Play==0){
B:setNumber(1,T)

}
}
if(Play==1){
    if(Record==0){
 holoAlpha(1,255)
if(Potato2==1){
Potato = 1
}
T = T + 1
OPos=Pos:vector(T)
OAng=Ang:angle(T)
holoPos(1,OPos)      
holoAng(1,OAng)
timer("moveanim",500)
 
        
    }
}

if(clk("moveanim")){
    holoAnim(1,210)
 holoSetPose(1,"move_scale",1)
 holoSetPose(1,"move_x",90)
holoSetPose(1,"move_yaw",180)   }

if(Potato==1){T = 0
Potato2 = 0
Potato = 0}

if(B:number(1)<T){T=0}
