panning a camera

I am creating a 2.5d game using the platform controller script found in the tutorials. Well, when the character has reached a certain area- i want it to pan the maincamera. I achieved this, but it started effecting the death spawn() function. Every time she died, it ended up panning the camera. I believe it has something to do because i was using ontriggerEnter-- and every time she hit a death area- she died. The camera was panning fine in the area where i needed to. Any ideas on how to pan the camera without effecting the death spawn function would be helpful. Thanks.

var camcam: GameObject;

function OnTriggerEnter (other : Collider) {

yield WaitForSeconds (1); camcam.transform.Translate(Vector3(51,5,-27));

}

Is this script on the character? I think the problem is, this will run any time the object the script is on hits any trigger. You need to test for the right collision - e.g. check if the Collider's GameObject is the one you are expecting and only run the code if it is.

if (other.gameObject.tag == "TheThingYoureLookingFor") { // rest of code }