• 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.

Animations

Status
Not open for further replies.
Level 13
Joined
Jun 3, 2011
Messages
1,058
Hi guys i want to ask in the animation trigger is there an attack for a character and there is a Attack - 1 Attack - 2 on the other character
What will i put if i create a trigger and put animation should i write Attack - 1?
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
set your unit into a variable, then do this :

call SetUnitAnimationByIndex(YourUnitVariable, AnyNumber)

tinker with the number until you get the right animation :)

for example :

  • Animation
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • Unit-Type of (Triggering unit) Equal to Footman
    • Actions
      • Set Unit = (Triggering unit)
      • Custom script : call SetUnitAnimationByIndex(Unit, 1)
I get the result for Footman
1 = Stand 2
2 = Stand Victory
3 = Stand 4
etc, etc.

the animation indiches are different, so you need to do trial and error until you find the right animation.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
^This could be even better:
  • TEST
    • Events
      • Player - Player 1 (Red) Presses the Left Arrow key
      • Player - Player 1 (Red) Presses the Right Arrow key
    • Conditions
    • Actions
      • Custom script: if GetHandleId(GetTriggerEventId()) == 261 then
      • Set i = (i - 1)
      • Custom script: else
      • Set i = (i + 1)
      • Custom script: endif
      • Custom script: call SetUnitAnimationByIndex(udg_u, udg_i)
      • Game - Display to (All players) the text: (This is animation with index of + (String(i)))
You can lock the camera to a unit you select.
 
Status
Not open for further replies.
Top