Lawrence Tran
New member
I am animating a pistol. I have 2 different animations for the reload. 1 with the slide closed, signaling to the player that there is ammunition left in the chamber. 1 with the slide open, signaling to the player that there is no more ammunition in the pistol. I want the manual reload to play the former animation and the auto reload to play the latter.
However, in the animator controller both manual reload and auto reload change the StateIndex to 3 and the SubstateIndex to 0; therefore, both manual reload and auto reload result in the former animation playing. I tried transitioning the latter animation from the fire animation with StateIndex equals 3, but this doesn't work. The former animation plays regardless.
How can I set it up so that the auto reload functionality in the ShootableWeapon component sets the StateIndex or SubstateIndex to another value, so I can play the latter animation when the pistol is empty? Or, is there a better way to get the same effect?
However, in the animator controller both manual reload and auto reload change the StateIndex to 3 and the SubstateIndex to 0; therefore, both manual reload and auto reload result in the former animation playing. I tried transitioning the latter animation from the fire animation with StateIndex equals 3, but this doesn't work. The former animation plays regardless.
How can I set it up so that the auto reload functionality in the ShootableWeapon component sets the StateIndex or SubstateIndex to another value, so I can play the latter animation when the pistol is empty? Or, is there a better way to get the same effect?