Play Certain Animation on Attack

Saiza

New Member
Reaction score
10
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:

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


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?
 

sLsIDK

New Member
Reaction score
13
I think you can make a dummy spell and base it off of cleave, then set the animation of the spell to the spell throw animation. Then you can hide the spell in a spellbook and remove it (not sure how to do this, sorry).

I have not tested this.

EDIT: And just incase you didn't assume so, the cleave spell needs to be useless (unless he has a cleave spell already, then you can just use that)
 

sLsIDK

New Member
Reaction score
13
Try it with critical strike then, but I don't know about removing the red text.

I'm trying to think of skills that modify attacks with animations, as I'm not at a computer with World Editor.
 

Bogrim

y hello thar
Reaction score
154
Trigger:
  • Actions
    • Animation - Play Unit's spell throw animation
    • Animation - Queue Unit's stand animation

Rocket science.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top