Attack Animations

YoyoZ

New Member
Reaction score
3
How can i make a unit only use one of its attack animations instead of both at random?
 

Battlemapsta

I am the Conduit of Change
Reaction score
101
Check my own issue to help you out.

http://www.thehelper.net/forums/showthread.php?t=130900

If it doesn't make sense to you then this is what you do. Firstly, make a unit variable and in a trigger set it to a unit. Then in the trigger where you want the unit to perform the animation add a .1 second wait time so no other animation overrides the one you want it to perform. Next add a custom script like so.

Trigger:
  • call SetUnitAnimationByIndex(udg_(Unit Variable),(Animation Integer)


As I've shown, you put the unit variable name in the paranthesis then a comma and then the animation integer of the animation you want it to perform.

To get the integer use something like WC3 Viewer. When looking at the animations of a model in the viewer remember to go in numerical order top to bottom counting the first animation as 0. In other words if it looked like this:

None
Stand 1
Stand 2
Stand 3
Attack 1
Attack 2

Say you want the unit to perform attack 2. Counting from stand 1 which counts as 0 you reach attack 2 as the integer of 4. So for that example, say your variable is Person then this is how your trigger should look at least.

Trigger:
  • Example
    • Events
    • Conditions
    • Actions
      • Set Person = Person 0000 <gen>
      • Wait 0.10 game-time seconds
      • Custom script: call SetUnitAnimationByIndex(udg_Person,4)


And after that ur done.
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top