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
-1
Question by Uping · Feb 04, 2014 at 05:07 AM · animationobjectplaytwoanother

how to play another animation on different object after the first one

ive created a QandA Game where in when you click ATTACK button a GUI with question will pup up then after you choose the correct or incorrect answer a certain animation will play, my problem is after the first animation play after you choose an answer, i want another animation to plays in the other object, im really new in this thing so i hope you understand me thank you

Comment
Add comment · Show 3
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 Nanobrain · Feb 04, 2014 at 05:29 AM 0
Share

You just posted this same exact code in an earlier post at link text. Are these two different questions, and did my answer fulfill your question on your other post?

avatar image Nanobrain · Feb 04, 2014 at 05:31 AM 0
Share

This seems like it may be a different issue. So, please clarify this:

want another animation to plays in the other object

What other object? Please explain your problem more thoroughly.

avatar image Uping · Feb 04, 2014 at 06:27 AM 0
Share

sorry for not explaining it thoroughly im really bad at english so im really sory but here it is,

after my first animation play for the first object Plays , i want the second animation plays for my second object, i cant really explain it well but, its like fighting first object punch then the other object returns the punch its like that

1 Reply

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

Answer by Nanobrain · Feb 04, 2014 at 06:35 AM

Just keep track of what object is currently animating. When the first object is done animating then start the animation for the second object.

 private int curAnimation = 0;
 
 public void update() {
     if(curAnimation == 0 && !animationOne.isPlaying()) {
         curAnimation = 1;
         animationTwo.play();
     }
 }
Comment
Add comment · Show 4 · 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 Uping · Feb 04, 2014 at 07:07 AM 0
Share

i cant really understand but i think its the correct answer to my problem but im getting errors im really a newbie for this im really sory but im still trying to figure it out

the name animationone does not exist in current context

avatar image Nanobrain · Feb 04, 2014 at 07:16 AM 0
Share

The code I posted above is just an example, it will not compile. You'll have to grasp the idea of it and apply within your code.

avatar image Uping · Feb 04, 2014 at 08:02 AM 0
Share

okay thank you ill try to figure it out

avatar image Nanobrain · Feb 04, 2014 at 06:33 PM 0
Share

Just let me know if you run into any more problems with this.

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

20 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

how to play two animations simultaneously in c#? 1 Answer

Play animation when 2 keys pressed? 3 Answers

Importing and playing animations 1 Answer

how to make my animation play one after another C# 0 Answers

How to play two animations simultaneously one after another ? 0 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