Playing Anim

Status
Not open for further replies.
If the unit is really "walking" I think you can't play an other animation. Only if you simulate the movement with SetUnitX/Y.

With ordering the unit to cast the "non-interrupting" -ability, it still will interrupt the current order, as obviously: IssueImmediateOrderById makes a new order.

Might be helpful: https://www.hiveworkshop.com/threads/issueimmediateorder.259418/post-2614490
 
call SetUnitAnimationByIndex(whichUnit, whichIndex)

Example: call SetUnitAnimationByIndex(udg_Caster, 2)
This will play the animation index of '2' by the Caster.
You should move your unit using SetUnitX/Y + SetUnitAnimationByIndex to move your unit and perform animation at the same time
 
Both of those function is native to JASS, it is not a custom movement system.

The difference between SetUnitAnimation and ByIndex is that ByIndex more accurate, I believe ?
It does not have vague string like SetUnitAnimation like "stand" or "stand 2", etc.
Also, taking argument from Integer compared to String, I think Integer more faster, just like in Hashtable, we use Integer compared to String mostly.

As said, by combining SetUnitAnimationByIndex + SetUnitX/Y, you can move your unit while doing the animation while attacking, because SetUnitX/Y does not interrupt unit's current order.
 
Both of those function is native to JASS, it is not a custom movement system.
I know, but I can't (or rather don't want to) use SetUnitX/Y to emulate walking.
If you use "PlayUnitAnimation", the unit makes it once.

If you use "SetUnitAnimationByIndex", the unit makes it until it plays a new animation.
I see, thanks.
 
So you want other native function that allows the unit to attack while moving, but not using SetUnitX/Y ?
I don't think there is a native function for that... unless a custom one, I think.

What are your complications on SetUnitX/Y ?
I've tried before, simulating a "walk" by using that function, it works without awkward movement.
Just need to check whether the unit isMove or not, if doesn't move, turn off the SetUnitAnimationByIndex to "stand" or something.

Even PurgeAndFire uses SetUnitX/Y (if I'm not mistaken) for his GUI MoveSpeed that bypasses max unit's 522 Movespeed.
 
Status
Not open for further replies.
Back
Top