Henchmen Pet system

Total Unity noob, but I'd like to know how to start making a system where a pet or a henchman companion will follow the player around. I don't want someone to code the system for me just a few pointers would be great.

I did a down and dirty AIBO pet thing that followed my hero around. It is a hack job on the AI script from the FPS tutorial. IT also may have some vars lying around that aren't actually used but if attached to a mesh with a character controller component and Audio Source attached, and a hero tagged 'Player" it will work.

It was a project I dropped so I never went further with it but it will play animations and sound whilst following and would be pretty easy to expand upon to incorporate "Loyalty" "Happiness" "Learning Ticks" or those kind of things that pets and henchmen do :).

The script may look like Greek to you if you are really new to Unity or game scripting but if you work through a few of the Unity tutorials or even watch a few ToronadoTwins youtube vids it may help you out.

var speed = 3.0;
var rotationSpeed = 5.0;
var minFollowRange = 30.0;
var dontComeCloserRange = 4.0;
var waitRange = 6.0;
var target : Transform;
var idleSound : AudioClip;
var chaseSound : AudioClip;
var attackSound : AudioClip;
var soundVolume : float = 1.0;
var damage = 1;
var hitEffect : GameObject;
private var lastHitTime = 0.0;

// Make sure there is always a character controller
@script RequireComponent (CharacterController)

function Start () {

    // Auto setup player as target through tags
    if (target == null && GameObject.FindWithTag("Player"))
        target = GameObject.FindWithTag("Player").transform;
    Patrol();
}

function ReConnect()
{
if (GameObject.FindWithTag("Player"))
Debug.Log("Reconnecting...");
target = GameObject.FindWithTag("Player").transform;
    //Patrol();
}

function Patrol () {
            //Start idle sound
            audio.Stop();

     var curPlayerPos = target.position;
    while (true) {

        if (CanSeeTarget ())
            yield StartCoroutine("FollowPlayer");

    }
}

function CanSeeTarget () : boolean {
    if (target != null)
                return true;
    }

function AIBOPlay () {
    //Stop Audio
            audio.Stop();

    var direction = target.position - transform.position;
    direction.y = 0;
    // Start idle animation
    animation.CrossFade("idle",0.4);    
    // Rotate towards the target
    transform.rotation = Quaternion.Slerp (transform.rotation, Quaternion.LookRotation(direction), rotationSpeed * Time.deltaTime);
    transform.eulerAngles = Vector3(0, transform.eulerAngles.y, 0);
//Delay following player until dontComeCloserRange time 2 - solved a stutter problem
if (Vector3.Distance(transform.position, target.position) > dontComeCloserRange * 2)
yield StartCoroutine("FollowPlayer");
}

function FollowPlayer() {
    //Start The Chase

    var lastVisiblePlayerPosition = target.position;
    while (true) {
        if (target == null) 
            target = GameObject.FindWithTag("DeadPlayer").transform;

            var distance = Vector3.Distance(transform.position, target.position);

            lastVisiblePlayerPosition = target.position;

                if (distance > dontComeCloserRange ) {
                MoveTowards (lastVisiblePlayerPosition);
                }else{
                RotateTowards(lastVisiblePlayerPosition);
                }

            // Start playing with player if close and n sight
            if (distance < dontComeCloserRange )
                yield StartCoroutine("AIBOPlay");
        yield;
        }
}

function MoveTowards (position : Vector3) {

    var direction = position - transform.position;
    direction.y = 0;
    animation.CrossFade("run", 0.0);
    if (direction.magnitude < 0.5) {
        SendMessage("SetSpeed", 0.0);
        return;
    }
    // Rotate towards the target
    transform.rotation = Quaternion.Slerp (transform.rotation, Quaternion.LookRotation(direction), rotationSpeed * Time.deltaTime);
    transform.eulerAngles = Vector3(0, transform.eulerAngles.y, 0);
    // Modify speed so we slow down when we are not facing the target
    var forward = transform.TransformDirection(Vector3.forward);
    var speedModifier = Vector3.Dot(forward, direction.normalized);
    speedModifier = Mathf.Clamp01(speedModifier);

    // Move the character
    var distance = Vector3.Distance(transform.position, target.position);
    if (distance > waitRange) {
        if (!audio.isPlaying){ 
           audio.Stop();    
            audio.clip = chaseSound;
            audio.loop = false;
            audio.Play();
        }
    }
    if (distance > minFollowRange  ) {
    speed = 8.0;
    }else if (distance < waitRange){
    speed = 2.0;
    }else{
    speed = 5.0;
    }
    direction = forward * speed * speedModifier;
    GetComponent (CharacterController).SimpleMove(direction);
    //SendMessage("SetSpeed", speed * speedModifier, SendMessageOptions.DontRequireReceiver);
}

function RotateTowards (position : Vector3) {

    var direction = position - transform.position;
    direction.y = 0;
    if (direction.magnitude < 0.1)
        return;

    // Rotate towards the target
    transform.rotation = Quaternion.Slerp (transform.rotation, Quaternion.LookRotation(direction), rotationSpeed * Time.deltaTime);
    transform.eulerAngles = Vector3(0, transform.eulerAngles.y, 0);
}

function OnDrawGizmosSelected ()
{
    Gizmos.color = Color.green;
    Gizmos.DrawWireSphere (transform.position, waitRange);
    Gizmos.color = Color.red;
    Gizmos.DrawWireSphere (transform.position, minFollowRange);
    Gizmos.color = Color.blue;
    Gizmos.DrawWireSphere (transform.position, dontComeCloserRange);
}