HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Animation Reset Help

04-14-2007, 02:49 AM#1
Here-b-Trollz
When you move a unit instantly, it resets the animation of the unit to the beginning of the animation/plays a stand animation. While I can except this, is there any way, short of actually making tiny animations, assigning them variables and cycling through them, to work around this issue?

Note: Feel free to post jass, as I understand.
Note II: If this issue is because of something in the Blizzard's move unit instantly function, like a reset unit animation function call, then I will feel stupid, but not stupid enough to keep from asking for a better function.
Note III: I have been using the SetUnitPositionLoc function.

The reasons for my asking this are as follows:
1. I have been trying to move units instantly while having them play a walk animation.
2. It has not worked.
3. The movement is for a realistic sloping curve turn/acceleration point system I am developing (for personal use only, as nobody else would be capable of understanding it).
4. This issue has just been annoying me.
Sorry if I am unclear on my issue.
Thankyou in advance.
04-14-2007, 02:57 AM#2
Earth-Fury
Collapse JASS:
call SetUnitX(u, x)
call SetUnitY(u, y)

Tryed those functions? (warning: they will not check pathing, so they can move units over unpathable stuff. As a side-effect of this, you can move units outside of the actual map. Which is verry bad.)
04-14-2007, 03:16 AM#3
Here-b-Trollz
Ahhh... Thankyou. Apparently, though, my issue is now that I am bad at setting unit animations.

Why is it that when I use this line, the animation is supposedly played, but only for a brief instant, and does not continue playing?

Collapse JASS:
call SetUnitAnimation( u, "walk" )

I have tested this on both a Map Init trigger and a bj_KEYEVENTTYPE_DEPRESS trigger.

Earthfury, thanks again for the quick reply.
04-14-2007, 08:30 AM#4
blu_da_noob
To animate walking you'll want to use SetUnitX/Y with SetUnitAnimationByIndex (can't remember if that's the exact name >.>).
04-14-2007, 08:33 AM#5
Pyrogasm
Quote:
Originally Posted by blu_da_noob
To animate walking you'll want to use SetUnitX/Y with SetUnitAnimationByIndex (can't remember if that's the exact name >.>).
That is the correct name of the function.
04-14-2007, 01:22 PM#6
Here-b-Trollz
Thankyou very much Blu! Now this will not bug me anymore.

~Cheers
05-22-2007, 09:18 PM#7
UnMi
SetUnitAnimationByIndex I have searched the forum, and I still don't know how to get the Index of animations of a model.
Rising_Dusk said something like, opening the MDL in a notepad?
I must be missunderstanding it...because I don't see anything in a notepad after doing so...
05-22-2007, 10:06 PM#8
Dil999
On the topic of SetUnitX/Y;
Is there a way to move a unit so it checks pathing but doesnt disable orders?