Need help to add a new idle animation that play when module changing

Hi, if you are wondering what I'm talking about, to put it simply : I have created a item based of the revolvers from the old west and now I am working on adding a fanning action that work based on module switching method. Right now it's working, you can alternate between two mode : "Simple" and "Fanning". I have also added a new firing animation that is playing when the "Fanning" mode is on. (see video below)

Fanning mode :

Now, the only thing that remain to make it perfect would be to add an alternate idle animation that trigger when I'm in "Fanning" mode to complement with the fanning firing animation, sort of like the aiming animation. If I change the base Idle animation it look like this :

Changing the Idle animation :

Now, as you have guessed, my objective is to have this new "Idle" animation specific to the "Fanning" mode triggered when I'm switching, but I don't know what method I should use though. I was thinking of making a new Item ability that would play the animation by using a new boolean added in the Animator controller (just like the Aiming parameter), but you guys know better than me how your controller works and all the methods to attain my goal, so please help me to achieve and thanks in advance for the replies. I have added videos to help you better understand the situation.

In the end, my final goal is to make something like this work with your controller and I am one step of finishing :

Final Wanted Result :

Hope that helped.
 
You could create a new ShootableExtraModule that overrides GetUseItemSubstateIndex and returns a new item state index when the module is active. Take a look at the DryFireSubstate module for an example.
 
Good Idea, I didn't think about this thanks I will try. Although I was able to do it by adding a boolean "Fanning" in the animator controller and with a script, I can activate/deactivate the animation using the same key as the module switcher and with some little tweak in the animator, I can switch between animation state as intented without major issues.

But I will try your suggestion for the next one, see if it work and get back here if I need more help. Thank again guys.

Here is the final result, I really enjoy the versatility or your controller :

 
Top