• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Models playing animation while moving?

Status
Not open for further replies.
Level 4
Joined
May 14, 2013
Messages
48
i want to make a spell for a lunge type of attack where the model uses the skill and moves forward while playing an attack animation. i have seen this done before but i cant figure it out to save my life. I want to apply this to many other spells like a dodge roll maybe an animated jump. perhaps some combo attacks as well.


i am trying to do this with a knock back system but i cant figure out the animation part i am going to post my trigger in the other section when its further along but i think i may going about this problem all wrong. so any ideas anyone has would be very helpful.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
If you wanna know the background process of how it works, here's how it works;
1. We use a function called SetUnitAnimationByIndex(whichUnit, whichIndex) to make a unit play its animation while not disrupting its order
2. But first, you need to find its index in which your desired animation. Each unit has their own index starting from 0 ~ n (n is the total number of animations that the unit has)
3. You have to find the correct index (let's say it is 4), you just have to call this function: call SetUnitAnimationByIndex(udg_Caster, 4) - we're assuming the variable Caster is the caster that cast a spell
4. This function would make the Caster unit to play its animation of index 4 (which I don't know, perhaps a "Walk - 4" animation ?

So this is how you would achieve this effect.
 
Status
Not open for further replies.
Top