About animation

mod256118

New member
Hello

I have questions with the animation

1. How to force the animation finished before going to the next animation? Like when the attacking animation is playing, the system will ignore other input. The reason to ask this question because I have added a new ability but I can non-stopping to active it by pressing the key, the animation now is playing each time I press the key which is not what I want.

2. How to set up a window that allows the player to input other action during a certain time of the action?
For example, after the attack animation (using root motion), the player can jump or run before the animation finished

3. I'm trying to add a new animation about a sword attack. All settings are same with the demo (except the animation ID) but the animation stop at the first. The Slot0ItemmStateIndex and Slot0ItemSubstateIndex have not changed, but I tried the original demo, these values will change in the demo scenes.
Is there any extra setting required but doesn't show in the youtube video? I also confused why the item - sword in the demo has 4 melee weapon script on it?
 
Last edited:
1. This relates to the priority within the ability list. Take a look at this page: https://opsive.com/support/documentation/ultimate-character-controller/character/abilities/

2. You'll likely need to subclass the actual ability if you only want it to start under certain circumstances. I would start by getting familiar with the ability system and then you can make your modifications from there.

3. Have you gotten the base sword attack animation working as done in the video? I would start with getting the basics working so you can get familiar with how the asset is setup and then start adding from there. There are 4 melee weapons for the different types of attacks: regular, in air, special, and counter attack.
 
Hello, thanks for the reply.

3. I found out it didn't work because the animation needs to add the event... now I can do the combo attack, but the Slot0ItemmStateIndex and Slot0ItemSubstateIndex are still not changed, and the animation stuck at the last attack animation. Is there any setting required outside the animator?

there is another problem that if I click the attack button too fast, the character animation will stuck, even the demo. All inputs will have no response and the character will only able to walk forward. Is this the demo animator problem or there is some settings are not allowed to use at the same time? There is no error message in the console.
 
Last edited:
3. I found out it didn't work because the animation needs to add the event... but the Slot0ItemmStateIndex and Slot0ItemSubstateIndex are still have not changed
Those values are changed when an item ability runs. On the Use ability for example you can change with StateIndex is called, and then the SubstateIndex is determined by the Animator Audio State Set: https://opsive.com/support/document...er-controller/items/animator-audio-state-set/

there is another problem that if I click the attack button too fast, the character animation will stuck, even the demo.
Can you list the steps to reproduce from a fresh project?
 
Hi, can you have a look at my setting? I have no idea what wrong with the setting and I have tried for a whole day.
The attack combo can be finished but if I attack and move at the same time, the animation will be stuck, all input will have no response.
If I don't finish the complete combo (for example, stop at the second one), the animation will also be stuck if I do the attack again.
 

Attachments

  • 1.PNG
    1.PNG
    47.5 KB · Views: 11
  • 2.PNG
    2.PNG
    89.5 KB · Views: 10
  • 3.PNG
    3.PNG
    86 KB · Views: 9
Unfortunately debugging the animator is extremely tough over text/screenshots. If the animator gets stuck you'll want to look at the parameters to see what the values are, and then ensures a transition exists for those animator parameters.
 
Hi, I have a new problem with the movement.
Now I'm using Third Person Pseudo 3 D and the character will stop when attacking, the combo finally has no problem, but I would like to make the character allow to rotate when the moment of transit from attack 1 to attack 2.
For example, when the player is attacking, when the first attack animation is finished, there will be a very short time allow the rotation, then when the attack 2 animation is started, the rotation input will not be allowed again.

Can I have some advice about how to make it? Or which example in the demo I can learn from it?

I tried the Abilities "Move Towards" but it has no effect on the action.
I tried to allow rotation input but the result will allow the player to rotate when the animation clip is playing, which is not I want.
 
Last edited:
There isn't any example code that allows another ability to start during a specific time period of an attack. You'll need to modify the CanStartAbility/ShouldBlockAbilityStart methods of the abilities that you want to allow to start and add in your own timing code.
 
Top