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

[Spell] Triggering Custom Attack Animations

Status
Not open for further replies.
Level 6
Joined
Aug 12, 2007
Messages
133
Hey I am making a creep-unit without an attack animation and want to trigger a different animation to overwrite his current (He doesn't play any animation).

Here's the Trigger. But it doesn't work.

  • Events
    • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Creep
    • Actions
      • Animation - Play (Attacking unit)'s stand 3 animation
Can someone help me?
 
Last edited:
Level 7
Joined
Dec 26, 2010
Messages
401
Check your animation box (when you've a unit selected to place, on the left hand side of the screen) and scroll through the animations to get the desired name of the animation you wish to play and trigger that to play... as far as any other animations, I'm not sure what you're trying to do. As far as I know, custom animations have to come with the model?
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
Well looks like it does play a stand animation, but not the specific stand 3.

maybe it's because the GUI function didn't know what's stand 3.

here, don't use this

  • Animation - Play (Attacking unit)'s stand 3 animation
use this instead

  • Set Creep = (Attacking unit)
  • Custom script: call SetUnitAnimationByIndex(Creep, Integer)
play with Integer (1,2,3,...,n) until you find the right animation.

i just tested it for Footman.
Integer = 1 is for Stand 2
Integer = 2 is for Stand Victory
Integer = 3 is for Stand 4
etc, etc.

all of units have different animation indices, so you will need to do trial and error until you find the right animation (stand 3). i hope you understand this.
 
Status
Not open for further replies.
Top