| 04-19-2005, 02:55 AM | #1 |
Guest | I made a trigger that plays attack animation when a unit casts spell. I want it to play same attack animation when casting the spell but it plays random attak animation. I tried Play Animation - Speicific .... but it still didn't work. Any ideas? |
| 04-19-2005, 05:27 AM | #2 |
There's a jass function for playing specific animations where you specify which animation to play with the index. Of course, you must first know what's the index of the animation you want to play, I think you can get it by looking at the model file or you can get it by making a test map where you use this function in a loop to play all of the unit's animations and then you see which one is it. Code:
set unitvar = (unit) custom Script : call SetUnitAnimationByIndex(udg_unitvar, 3) |
| 04-19-2005, 10:06 PM | #3 |
the index can be read at the "view window" on the left of the world editor. it starts at index 1 (ithink... might be 0), when u press arrow 2 the right the index just increases. No need 2 extract the model and stuff ^_^ |
