How to trigger a cutscene movie?

Hi there,

I have another question that would be a great help if answered.

Currently i have a trigger that when my player moves into a hidden object a new scene is loaded, heres the code for that:

var 1;

function OnTriggerEnter (other : Collider) {

if (other.gameObject.CompareTag("Player")) {
    Application.LoadLevel(1);
}

}

However i would like a cutscene (a simple MOV file) to play full screen after the player has triggered the event but before they have entered this new level.` (An example of this is a cutscene of a boss crashing through trees and arriving at your location, in this new scene you will need to fight this boss)

Also, if i'm not pushing it, i would like to know how to get a MOV file to play before the game is loaded, for example an intro cutscene.

Thanks, any help would be greatly appreciated!

You can create a new scene (for Application.LoadLevel) and execute this MovieTexture function on Load:

function Start () {
    renderer.material.mainTexture.Play ();
}

Scripting Reference

To start loading the level in the background, use the Application.LoadLevelAsync function

If your using Unity Indie you could do this. Duplicate your scene with the boss battle. Remove all scripts (at least ones that control the player and the boss and any other AI). Now you could recreate your .mov file by simply redoing the animation in Unity. Make sure the main camera has an animation to look at what you want it to look at. Then convert the sound of the .mov file into a .wav file. Add an audio source to your main camera and add the .wav file as the sound you want played. Then you would need to add a script that would loadlevel(1) when the animation is finished. I can't help you much there as I'm not very experienced with code. But maybe you'll know how to do this.