@name Dog_Follower
@inputs 

@outputs 
@persist Rep LPos:vector
@trigger 

if(first()){
    holoCreate(1)
    holoModel(1, "models/AntLion.mdl")
    holoAnim(1, 4)
    }

runOnTick(1)
runOnChat(1)
if(Rep){holoPos(1, (owner():pos()-owner():eye()) + vec(0,50,3))}
else{holoPos(1, entity():pos())}
holoAng(1, owner():angles())
LPos = owner():pos()



if(chatClk(owner())){
    Chat = owner():lastSaid():explode(" ")
    if(Chat:string(1) == "/follow"){
        hideChat(1)
        holoAnim(1, 30)
        holoAnim(1, 4)
        Rep = 1
        }
    if(Chat:string(1) == "/unfollow"){
        hideChat(1)
        holoAnim(1, 29)
        timer("wait", 1000)
        Rep =0
        stoptimer("wait")
        }
    if(Chat:string(1) == "/remove"){
        hideChat(1)
        selfDestruct()
        }
    }

