• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[Trigger] Playing a unit's walk animation

Status
Not open for further replies.
Level 14
Joined
Aug 30, 2004
Messages
909
So here's an annoying problem... I want a unit to play their walk animation while I move them with a repeated trigger. She starts to move and then immediately stops and reverts to her stand animation. I made a test map with one trigger:

  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across (Playable map area)
      • Wait 1.00 game-time seconds
      • Animation - Play Jaina 0000 <gen>'s walk animation
Jaina will jerk for a second as if starting an animation, but then just stand there.

I tried pausing her, cutting to a cinematic, setting her move speed to zero... I can think of nothing else. How the hell do you get a unit to play their walk animation?!


EDIT: I found this command worked: Custom script: call SetUnitAnimationByIndex(udg_TempUnit, 6)
 
Last edited:
I actually did know that (I think you taught it to me awhile ago). If you look at my trigger though, you'll see this same bug appears if all my map does is tell Jaina to walk. Even without moving the unit at all.
That's normal; the animation will only play once. You need to queue the walk animation.
 
Level 14
Joined
Aug 30, 2004
Messages
909
It's not playing the animation. It's just a jerky kind of move (showing the animation starts) and then instantly reverts to the stand animation. If you have your editor open, put a Jaina in a blank map and tell her to walk. You'll see what I mean.
 
It's not playing the animation. It's just a jerky kind of move (showing the animation starts) and then instantly reverts to the stand animation. If you have your editor open, put a Jaina in a blank map and tell her to walk. You'll see what I mean.
Probably something messed up inside the BJ code. Good to know that the native worked.
 

Kazeon

Hosted Project: EC
Level 34
Joined
Oct 12, 2011
Messages
3,449
Try to use this:
JASS:
call SetUnitAnimationByIndex(yourUnit, index)

Try index 0 (zero) - n, until you find the walk animation.
;) As far as I know, walk animation can only be played that way. And don't forget about that SetUnitPosition thingy.

In GUI:
  • Custom script: call SetUnitAnimationByIndex(yourUnit, index)
 
Level 14
Joined
Aug 30, 2004
Messages
909
Try to use this:
JASS:
call SetUnitAnimationByIndex(yourUnit, index)

Try index 0 (zero) - n, until you find the walk animation.
;) As far as I know, walk animation can only be played that way. And don't forget about that SetUnitPosition thingy.

In GUI:
  • Custom script: call SetUnitAnimationByIndex(yourUnit, index)

Thanks Dalvengyr, that did indeed work. It's sad, but I had this exact problem 2 years ago and completely forgot about the solution!
 
Status
Not open for further replies.
Top