How to differentiate between prefabs on collision.

I have several character prefabs created one at a time. The prefabs move on their own through a stage. When a character collides with an object I need them to pick it up (it attaches to a mount in their hierarchy). I have this working just fine except for when the second prefab is created.

If the second prefab touches the object, it becomes attached to the first prefab’s mount instead of the one that touched it. I’m not sure how I am supposed to tell the object which prefab is which. Here is the script I currently have.

var itemTransform : Transform;
var mountTransform : Transform;

function Start()
{
itemTransform = gameObject.Find("Item").transform;
mountTransform = gameObject.Find("Mount").transform;
}

function OnTriggerEnter (theCollision : Collider)
{
if(theCollision.gameObject.tag == "Item")
{
theCollision.transform.parent = mountTransform;
}
}

I figured out how to make it work. Using

mountTransform = transform.Find("hierarchy/path/to/mount");

This was actually the first thing I tried, but couldn’t get it to work because I put the entire path including the name of the prefab object. By dumb luck I randomly decided to drop the top level of the hierarchy and just start listing from the armature and it worked like a charm.