• 🏆 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!

[JASS] Animatins while moving

Status
Not open for further replies.
Level 17
Joined
Jun 28, 2008
Messages
776
How can I make a unit play a certain animation while I move the unit with triggers.

Here is what I have :

JASS:
local timer t = GetExpiredTimer()
    local unit  u = GetHandleUnit(t, "sweep")
    local location p1 = GetUnitLoc(u)
    local location p2 = PolarProjectionBJ(p1, 20, GetUnitFacing(u))
    local real x = GetLocationX(p2)
    local real y = GetLocationY(p2)
    
    call SetUnitAnimation(u, "attack slam")
    
    call SetUnitPosition(u, x, y)
    
    call RemoveLocation(p1)
    call RemoveLocation(p2)

set u = null

While the unit is moving, it doesn't play its animation, it just stands there.

Any help?
 
Last edited:
Status
Not open for further replies.
Top