Enemies Spawn, Then Follow Waypoints

What the title says. Here's my waypoint script, but because I can predefine the targets of the array on a prefab, I'll have to predefine them in the script, can anyone help me out here?

var waypoint : Transform[];
var currentWaypoint : int;
var speed : float = 20;

function Update(){
    if(currentWaypoint < waypoint.length){
        var target = waypoint[currentWaypoint].transform.position;
        var moveDirection : Vector3 = target - transform.position;
        var velocity = rigidbody.velocity;
        if(moveDirection.magnitude < 1){
            currentWaypoint++;
        }else{
            velocity = moveDirection.normalized * speed;
        }
    }
    rigidbody.velocity = velocity;
}

The standard way to predefine waypoints is to create an empty, name it "path1" or something, and child empties to it to make the actual waypoints (NOTE: the editor sorts by name, but the game sorts by the order you make them, so be careful to create and name them in order.)

Once you have that, have the spawn command "tell" it which path to follow:

// a regular spawn: (this is C#, sort of)
Transform enemy = Instantiate(badDude, .....);
// hook up the enemies path transform to the actual path (named path1):
enemy.GetComponent<enemyScript>().path = GameObject.Find("path1");

// Enemy code to find next waypoint:
// I don't know a good way to get child#X. This should work if your
// paths are all labelled p0 p1 p2 ...
// if you are on wayPointNum=2, this gets position of the p2 child of your path:
wayPoint = path.Find("p"+wayPointNum).position;

Or, after you spawn, use the same trick in the spawner to create the enemy's wayPoint array and fill it in.