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 kylix · May 03, 2012 at 05:06 PM · animationblend

AttackRunning and running animations are not blending

Hello everyone! I'm trying to blend the attackRuning animations with the run animation when the character finishes de attackRuning animations and keeps running.

I achieved to do so with the attack animations and idle animation when the charcter doesn't move.

I'm using the same procedure with both sequence types but its not working on the running ones... Anyone can help me here??

Here's the code, its a little bit large but simple:

function Start() { animation["charge"].wrapMode = WrapMode.Once; animation["charge"].speed = 0.5; animation["attackleft"].wrapMode = WrapMode.Once; animation["attackleft"].speed = 1.5; animation["attackleft"].layer = 1; animation["attackright"].wrapMode = WrapMode.Once; animation["attackright"].layer = 1; animation["attackpleft"].wrapMode = WrapMode.Once; animation["attackpleft"].layer = 1; animation["attackpright"].wrapMode = WrapMode.Once; animation["attackpright"].layer = 1; animation["attackdouble"].wrapMode = WrapMode.Once; animation["attackdouble"].layer = 1; animation["attackdoubleturn"].wrapMode = WrapMode.Once; animation["attackdoubleturn"].layer = 1; animation["attacrunkleft"].wrapMode = WrapMode.Once; animation["attacrunkleft"].speed = 1.5; animation["attacrunkleft"].layer = 1; animation["attackrunright"].wrapMode = WrapMode.Once; animation["attackrunright"].layer = 1; animation["attackrunLleft"].wrapMode = WrapMode.Once; animation["attackrunLleft"].layer = 1; animation["attackrunpright"].wrapMode = WrapMode.Once; animation["attackrunpright"].layer = 1; animation["attackrunturn"].wrapMode = WrapMode.Once; animation["attackrunturn"].layer = 1; animation.Stop(); } function AnimateCharacter() { if (movement.isMoving && !jump.jumping && !charge.charging && movement.speed > 10 && !runattack.runattacking){ animation.CrossFade ("run"); } else if (movement.isMoving && !jump.jumping && !charge.charging && movement.speed <= 10 && !runattack.runattacking) { animation.CrossFade ("walk"); } else if(!movement.isMoving && controller.isGrounded && !charge.charging && !attack.attacking){ runattack.runattackAnim = false; animation.CrossFade ("idle"); } else if (jump.jumping && !charge.charging) { animation.CrossFade ("jump"); } else if (charge.charging && charge.chargeAnim) { animation.Play ("charge"); charge.chargeAnim = false; } else if (attack.attacking && attack.attackAnim && controller.isGrounded && !movement.isMoving) { if (!attack.alque) { animation.CrossFade ("attackleft"); attack.attackAnim = false; attack.alque = true; } else if (!attack.arque) { var attr : AnimationState = animation.CrossFadeQueued ("attackright"); attr.speed = 1.5; attack.attackAnim = false; attack.arque = true; } else if (!attack.aplque) { var attpl : AnimationState = animation.CrossFadeQueued ("attackpleft"); attpl.speed = 1.5; attack.attackAnim = false; attack.aplque = true; } else if (!attack.aprque) { var attpr : AnimationState = animation.CrossFadeQueued ("attackpright"); attpr.speed = 1.5; attack.attackAnim = false; attack.aprque = true; } else if (!attack.adque) { var attd : AnimationState = animation.CrossFadeQueued ("attackdouble"); attd.speed = 1.5; attack.attackAnim = false; attack.adque = true; } else if (!attack.adtque) { var attdt : AnimationState = animation.CrossFadeQueued ("attackdoubleturn"); attdt.speed = 1.5; attack.attackAnim = false; attack.adtque = true; } else { attack.attackAnim = false; } } else if (runattack.runattacking && runattack.runattackAnim && controller.isGrounded && movement.isMoving) { if (!runattack.ralque) { animation.CrossFade ("attackrunleft"); runattack.runattackAnim = false; runattack.ralque = true; } else if (!runattack.rarque) { var rattr : AnimationState = animation.CrossFadeQueued ("attackrunright"); rattr.speed = 1.5; runattack.runattackAnim = false; runattack.rarque = true; } else if (!runattack.raplque) { var rattpl : AnimationState = animation.CrossFadeQueued ("attackrunLleft"); rattpl.speed = 1.5; runattack.runattackAnim = false; runattack.raplque = true; } else if (!runattack.raprque) { var rattpr : AnimationState = animation.CrossFadeQueued ("attackrunpright"); rattpr.speed = 1.5; runattack.runattackAnim = false; runattack.raprque = true; } else if (!runattack.ratque) { var rattt : AnimationState = animation.CrossFadeQueued ("attackrunturn"); rattt.speed = 1.5; runattack.runattackAnim = false; runattack.ratque = true; } else { runattack.runattackAnim = false; } } }

Thank you for your time! Best regards!

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

0 Replies

· Add your reply
  • Sort: 

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Animation.Play blends previous animation 1 Answer

Problem Animation Blend 1 Answer

Increse animation state 0 Answers

How to play multiple animations on the same game object. 2 Answers

How to change shader blend type in animation? 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