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

Model animations and stuff

Status
Not open for further replies.
Level 11
Joined
Feb 14, 2009
Messages
884
I have absolutely no idea what you're asking, but I'm pretty sure it's in the wrong section. Oh, and you cannot bump a thread unless at least 2 days have passed, which haven't.
 
Level 8
Joined
Jun 26, 2010
Messages
530
That script?

JASS:
SetUnitAnimationByIndex (Unit, Index #)

You can add custom cripts in the general section of the triggers.
 
Level 8
Joined
Jun 26, 2010
Messages
530
I get an error from that. do i put it in actions? I'm so confused...

Okay, say my unit was call "Worm Archer" and I wanted him to do the Attack - 1 animations, how would i do that with the script?

Yes, it's an action. If you using GUI i think you actuyally can't put it anywhere.

Try something like that:

  • Events
    • Unit - A unit is attacked
  • Conditions
    • Unit Comparisson - Atacking unit equal to worm archer
  • Actions
    • Custom Script - SetUnitAnimationByIndex (GetAttacker(), Index #)
Where you replace # by the integer that play the unit's desired anymation.
 
Level 4
Joined
Oct 22, 2007
Messages
61
Yes, it's an action. If you using GUI i think you actuyally can't put it anywhere.

Try something like that:

  • Events
    • Unit - A unit is attacked
  • Conditions
    • Unit Comparisson - Atacking unit equal to worm archer
  • Actions
    • Custom Script - SetUnitAnimationByIndex (GetAttacker(), Index #)
Where you replace # by the integer that play the unit's desired anymation.
I don't think there is cause I haven't found it but is there "Unit attacks" cause the "Unit - A unit is attacked" thing sounds more like its a unit being attack and it animates.

I get this error.
JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    SetUnitAnimationByIndex (GetAttacker(), Gold)
 
Status
Not open for further replies.
Top