Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by supertrentyguy · Mar 27, 2013 at 09:22 PM · animationtriggercutscenehorror

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!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by LightSource · Mar 28, 2013 at 12:53 AM

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));
 
 }
Comment
Add comment · Show 9 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image supertrentyguy · Mar 28, 2013 at 05:19 PM 0
Share

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 ins$$anonymous$$d 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'.

avatar image LightSource · Mar 28, 2013 at 11:19 PM 0
Share

Oops,it needs var before it. And it is a Javascript. I'm changing it now.

Unity updates do not change javascript.

avatar image supertrentyguy · Mar 28, 2013 at 11:33 PM 0
Share

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.

avatar image LightSource · Mar 28, 2013 at 11:34 PM 0
Share

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

avatar image supertrentyguy · Mar 28, 2013 at 11:36 PM 0
Share

Derp. Puts semicolon ... Assets/animation.js(9,22): BCE0023: No appropriate version of 'UnityEngine.Application.LoadLevel' for the argument list '()' was found. D:< Wait... I think I know what to do here... Nope, I broke it even more. >.< I just reset the code before I broke it. :P I just started using unity 6 days ago, and I haven't quite learned what the error reports mean yet. Done updating this comment. WAIT! I FIXED IT! I FIXED IT! :D

 var main$$anonymous$$enuSceneName : String;
 var hold : int = 11; //Set this for how long your animation is
  
 function Update () {
  
 //Play animation
  
 wait();
  
 Application.LoadLevel(main$$anonymous$$enuSceneName); //Your scene
  
 }
  
 function wait () {
  
 yield WaitForSeconds ((hold));
  
 }

... Never$$anonymous$$d, the cutscene doesn't even have time to do it's thing, it just goes to the game. ._.

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Drop down menu trigger'd cutscene 0 Answers

Wait() is not working for me! 2 Answers

Trigger an animation 1 Answer

play a door animation with collider 1 Answer

call/trigger animation of other object 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges