Canceling An Attack Animation Using Script

Tester115

Member
Hello,

I was wondering if there was any way I could cancel a first-person attack animation and reset the arms back to an idle animation using a script command.
 
How about:

C#:
var characterLocomotion = transform.GetComponent<UltimateCharacterLocomotion>();
if (characterLocomotion == null) return; // Character locomotion not found

var useAbility = characterLocomotion.GetAbility<Use>();
if (useAbility == null) return; // Use ability not found

useAbility.stopAbility(false); // Just stops the ability Use

(I didn't test this code)

Because if you stop all abilities, then if your character is jumping, running or crouching it will also stop.
 
How about:

C#:
var characterLocomotion = transform.GetComponent<UltimateCharacterLocomotion>();
if (characterLocomotion == null) return; // Character locomotion not found

var useAbility = characterLocomotion.GetAbility<Use>();
if (useAbility == null) return; // Use ability not found

useAbility.stopAbility(false); // Just stops the ability Use

(I didn't test this code)

Because if you stop all abilities, then if your character is jumping, running or crouching it will also stop.

I'll try this out during my testing. Thanks!
 
Top