• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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 33
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