spell animation

BRUTAL

I'm working
Reaction score
118
im using a water elemental, and i looked up its animations in War3modeleditor, anyways, it has 3 stand animations, and for the spell i want to use "Stand 2" so i tried putting like "stand 2" and "stand2" in the animation field for the spell, but it does 1 of the 3 randomly each time, how can i just make it do the one stand animation that i want? :p
 

Flare

Stops copies me!
Reaction score
662

Tinki3

Special Member
Reaction score
418
You could use the "SetUnitAnimationByIndex" function.
But first, you will need to find which value plays the animation you want.
A simple method like so will display each index value from 1 to 15 over 30 seconds for some unit:
Code:
Actions
    Set My_Unit = <your unit>
    For Each (Integer A) from 1 to 15 do (Loop Actions)
        Loop - Actions
            Custom script:    call SetUnitAnimationByIndex(udg_My_Unit, bj_forLoopAIndex)
            Game - Display to (All Players) the text: (Integer(Integer A))
            Wait 2.00 seconds
 

BRUTAL

I'm working
Reaction score
118
lol
i did what tinki3 did, was cool all the animations :p
+rep all
o shit, wait this is related to the hero contest, and jass cant be used for anything but removing leaks
T_T
 

BRUTAL

I'm working
Reaction score
118
Code:
Animation - Play blah's stand2 animation, using only Rare animations

that works :D
 

BoterhaM

New Member
Reaction score
2
ive checked that little trigger and animation 10 suits the best for my spell animation but it doesnt work :(
tried:

Animation - Play <unit> stand10 animation, using only Rare animations
Animation - Play <unit> attack10 animation, using only Rare animations
Animation - Play <unit> stand10 animation
Animation - Play <unit> attack10 animation

TT
 

Flare

Stops copies me!
Reaction score
662
You need to use the JASS function to play that animation

JASS:
native SetUnitAnimationByIndex takes unit whichUnit, integer whichAnimation returns nothing


so, for example, if you wanted triggering unit to play a specific animation (i dont know the anim indexes for water ele, lets just say u need to use no. 2)


That's how :D

Just replace GetTriggerUnit () with your unit, and 2 with 10

End result:
JASS:
call SetUnitAnimationByIndex (udg_MyUnitVar, 10)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top