How do you specify the type of animation looping?

Hi everyone. I want an animation to play and just stop forever when it is finished. The animation is controlled by a trigger and at the moment, everytime you roll over the trigger the door opens. I dont want that. I want so that the trigger goes inactive after you roll over it once. Also i was wondering if you could specify what kind of loop you want in a script. (Normal, LoopForever, Ping-Pong, etc.)

animation.Play ("Take 001");

Thanks, Alias

You'd use animation.wrapMode:

animation.wrapMode = WrapMode.Loop;

Alternatively, you could change the wrap mode for the specific animation state:

animation["Take 001"].wrapMode = WrapMode.Loop