Hi! I'm finding a way to change the animation based on variables as it would be very helpful in a lot of scenarios in my game.

Example of things I wanna achieve through this:
1. Having different idle animation based on combatant's hp (as per rpgs like FF9 or Chrono Cross), whereby when the hp is low the combatant will show injure idle animation, or when the combatant is confused it will dance around and stuff.
2. In my game, combatant will play cast animation (mecanim) upon casting. But the problem occurs whereby if they're attacked by an enemy when they're casting, damage animation will play and the damage animation will link them into idle state (even though they're still casting). So I hope there's a way to switch the idle animation from default battle idle animation into casting idle animation depending on variables.

Thanks a bunch!
  • 1) This is best handled by status effects - like equipment, effects can override the combatant's animation. See the status effect's Animation Settings for this.
    E.g. for low HP, you can set up a (hidden) status effect that overrides the idle animation, using Auto Apply/Remove Settings to add/remove the effect automatically when HP is low.

    2) Hm, try using a Bool parameter for the cast animation and have your animator transition to your cast animation whenever the parameter is true.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.