• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Alternatives to Play Animation function?

Status
Not open for further replies.
Level 12
Joined
May 20, 2009
Messages
822
I need something for my movement system that I'm working on to make animations play properly. I don't know what's causing the issue at hand, but animations either don't play at all or very quickly restart. If you could tell me an alternate function or helping me figure out what's wrong with it, that'd be greatly appreciated.

Here is a download to the map if you want to look at it: Download
 
Level 12
Joined
May 22, 2015
Messages
1,051
I can't check the map right now, but isn't there something like run speed in the animation fields in the object editor? I think it is to set how fast their animation plays while they are moving.

Maybe those speeds determine when to use which animation or something? I don't know. I've never fiddled with them, but that is what I assumed they do...
 
Use SetUnitAnimationByIndex.

i.e. call SetUnitAnimationByIndex(<Unit>, 5)

That will play the unit's 5th animation. The issue is that this solution is less portable than just telling a unit to "stand" (you have to find the appropriate index for each unit you want to support) but it usually gets the job done better than the normal "Play Animation" function.
 
Status
Not open for further replies.
Top