• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] Casting Animation With Attack

Status
Not open for further replies.
Level 9
Joined
Apr 30, 2010
Messages
324
Well, i want the unit play an animation when it cast.. the animation is Attack - 3.. But whenever i write attack,3 or attack - 3 on the object editor, it won't run the animation... attack,3 ,will play a random attack animation, and attack - 3 won't play any animation... since, attack, slam .. spell, slam.. spell, throw ,already been used for other purpose.. i need to know how to play specific attack animation..
 
Level 11
Joined
Nov 15, 2007
Messages
800
You need to use (via custom script) SetUnitAnimationByIndex(unit, index)

Indexes start at 0 and there's really no way of knowing which corresponds to what animation other than testing them yourself.
 
Level 9
Joined
Apr 30, 2010
Messages
324
You need to use (via custom script) SetUnitAnimationByIndex(unit, index)

Indexes start at 0 and there's really no way of knowing which corresponds to what animation other than testing them yourself.

If you open that model in WC3 viewer, the animation list in there is sorted by animation index. Don't forget indexes start at 0 and *No animation* does not count among them.

I'm not really good at jass/custom script, how do i wrote them? Can post the trigger?
 
Level 9
Joined
Apr 30, 2010
Messages
324
i got an error :/

tell me what is the problem

  • Raging Blow
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Raging Blow
    • Actions
      • Set RB = (Triggering unit)
      • Custom script: SetUnitAnimationByIndex(udg_RB, 2)
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (((0.20 x (Real((Level of Raging Blow for (Triggering unit))))) + 1.50) x (Real((Agility of (Triggering unit) (Include bonuses))))) damage of attack type Hero and damage type Normal
      • Special Effect - Create a special effect attached to the chest of (Target unit of ability being cast) using war3mapImported\Effect_Hit_B.mdx
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the chest of (Target unit of ability being cast) using Abilities\Weapons\SteamTank\SteamTankImpact.mdl
      • Special Effect - Destroy (Last created special effect)
 

Attachments

  • Untitled.png
    Untitled.png
    65.2 KB · Views: 127
Status
Not open for further replies.
Top