• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

How to make a unit play specific animation when casting specific spell?

Status
Not open for further replies.
Level 3
Joined
Mar 18, 2023
Messages
28
Hi. New Scrub learning WE. Was wondering how I can make a specific unit cast the animation "spell slam 2" when he casts a specific spell. I read multiple threads already and tried what ppl said. Haven't got it to work. I tried with object editor (Art - Animation Names) 1st and triggers 2nd. The ability I'm using is Shockwave. If any more info is needed, let me know. Thx ahead of time!
 

Attachments

  • animation name.png
    animation name.png
    2 KB · Views: 16
  • object editor.png
    object editor.png
    4.9 KB · Views: 16
  • trigger.png
    trigger.png
    9.2 KB · Views: 17

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,659
Hello, the first thing I can see is that your Tail trigger is disabled, are you aware of this? You probably need to enable JassHelper (you'll see the menu for it in the Trigger Editor) then re-enable that trigger and try again. Also, SetUnitAnimationByIndex() takes a specific animation integer, are you positive that 8 is the animation you need? Lastly, the Wait may need to be longer as well.
 
Level 3
Joined
Mar 18, 2023
Messages
28
Hello, the first thing I can see is that your Tail trigger is disabled, are you aware of this? You probably need to enable JassHelper (you'll see the menu for it in the Trigger Editor) then re-enable that trigger and try again. Also, SetUnitAnimationByIndex() takes a specific animation integer, are you positive that 8 is the animation you need? Lastly, the Wait may need to be longer as well.
Yeah I disabled it since it wasn't working. The unit animation should be correct unless I misread this other thread. The person said numbering starts with "0" and that "Unanimated" isn't counted. I set the wait to "0" since that's what another person said from a different thread too haha. I'll try working with 0.1 and see if anything happens. Thank you.

Edit: Also I forgot to add "call" at beginning of "SetUnitAnimationByIndex" I did it right now and still didn't work
 

Attachments

  • full animation list.png
    full animation list.png
    8.1 KB · Views: 11

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,659
Try a longer Wait, try a different animation index, double check to make sure it's the correct ability in the Trigger Conditions, and try adding additional Actions to prove that the trigger is even working, for example a Text Message always helps. Units can be pretty stubborn about animations and often times they'll interrupt and cancel a triggered animation.

Unfortunately some genius at Blizzard thought it was okay to only allow generic spell animations instead of the exact animation you wanted, because why would anyone want that :peasant-rolling-eyes:
 
Last edited:
Level 3
Joined
Mar 18, 2023
Messages
28
Try a longer Wait, try a different animation index, double check to make sure it's the correct ability in the Trigger Conditions, and try adding additional Actions to prove that the trigger is even working, for example a Text Message always helps. Units can be pretty stubborn about animations and often times they'll interrupt and cancel a triggered animation.

Unfortunately some genius at Blizzard thought it was okay to only allow generic spell animations instead of the exact animation you wanted, because why would anyone want that :peasant-rolling-eyes:
Alright, I kept throwing in random index # and it worked. Finally got the one I wanted. Thank you everything man, appreciate it greatly!
 
Status
Not open for further replies.
Top