Move a Unit without interrupting an animation?

Status
Not open for further replies.
Level 6
Joined
Aug 22, 2005
Messages
113
I want a custom arrow key movement system in my game, to be able to have on-the-fly movement using the ''Move (instantly)'' action. How can I do this without having their animation be reset to Stand?

EDIT: Bah. Wish I could delete this post.
 
You can use two JASS lines, it's really simple:

  • Actions
    • Set YourUnit = ...
    • Set YourUnitLoc = Position of YourUnit
    • Set NewLoc = YourUnitLoc offset by bla bla
    • Custom script: call SetUnitX(udg_YourUnit, GetLocationX(udg_NewLoc))
    • Custom script call SetUnitY((udg_YourUnit, GetLocationY(udg_NewLoc))
Those two functions don't stop the animation, afaik. You can name your variables whatever you want, but be sure to change the parts after "udg_" too.

If something isn't clear, I can explain further.
 
Status
Not open for further replies.
Back
Top