Animation end trigger

I need help with a cutscene in unity pro, basically what I am trying to do is after a the camera aminimation is done, I want it to go to the next scene, which is named Horror. Basically this cutscene is just you getting up from the ground whilst breathing heavily (From a first person perspective) Help!

1 Answer

1

Here is a concept to start you off.

var hold : int = 5; //Set this for how long your animation is

function Update () {

//Play animation

wait()

Application.LoadLevel(); //Your scene

}

function wait () {

yield WaitForSeconds ((hold));

}

I'll try. ... It didn't work. I tried C# and javascript, but what it did was it said on the java script one that it was expecting "EOF" at the first line instead of "hold" I am using unity 4.0, maybe it's part of a new update? And the C# ended in total devastation. :/ Ok, I'll update my unity and see if that works. ... Which will take an hour. D:< Nope, it's not working. Here's what I get; Assets/animation.js(1,1): BCE0044: expecting EOF, found 'hold'.

Oops,it needs var before it. And it is a Javascript. I'm changing it now. Unity updates do not change javascript.

I hope this works... ... It didn't! D: This is what happened; Assets/animation.js(7,7): UCE0001: ';' expected. Insert a semicolon at the end.

Oh come now... you can fix this one cant you? Put a semi-colon at the end of wait().

Just put your level number inside the ().