Hello!
I'm creating a ranged Mountain King, and I want him to use the spell throw animation each time he attacks. This is how I did it:
The point with the unit group is that I need to play the stand animation after the attack is done so he doesn't look frozen. I am wondering if there is any easier way to change his attack animation without editing the model?
I'm creating a ranged Mountain King, and I want him to use the spell throw animation each time he attacks. This is how I did it:
Trigger:
- Alliance Strength Ranged Attack Animation
- Events
- Unit - A unit Is attacked
- Conditions
- (Unit-type of (Attacking unit)) Equal to Mountain King
- Actions
- Custom script: local unit Attacker = GetAttacker()
- Unit Group - Remove (Attacking unit) from MountainKing_AttackGroup
- Animation - Play (Attacking unit)'s spell throw animation
- Unit Group - Add (Attacking unit) to MountainKing_AttackGroup
- Wait 1.36 seconds
- Custom script: set udg_Unit[1] = Attacker
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Unit[1] is in MountainKing_AttackGroup) Equal to True
- Then - Actions
- Animation - Play Unit[1]'s stand animation
- Else - Actions
- If - Conditions
- Events
The point with the unit group is that I need to play the stand animation after the attack is done so he doesn't look frozen. I am wondering if there is any easier way to change his attack animation without editing the model?