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

[Trigger] [trigger] "play unit animation" can't function very well

Status
Not open for further replies.
Level 11
Joined
Oct 20, 2007
Messages
342
  • Untitled Trigger 001
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Animation - Reset Succubus 0027 <gen>'s animation
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • i Equal to 0
        • Then - Actions
          • Set i = 1
          • Animation - Play Succubus 0027 <gen>'s attack - 1 animation
        • Else - Actions
          • Set i = 0
          • Animation - Play Succubus 0027 <gen>'s attack - 2 animation
this what i write,
what it do:
sometime attack -1 and sometime attack - 2

what he do juz same like the trigger:
  • Untitled Trigger 002
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Animation - Reset Succubus 0027 <gen>'s animation
      • Animation - Play Succubus 0027 <gen>'s attack animation
so how to play a specify animation?
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
You don't manually make the title prefix
  • . You should place this in the Triggers & Scripts section. It's better for the forum organisation and better for you, since you'll get an answer quicker and don't get someone like me, posting that you should post elsewhere.
  • About your question: Is it 'Attack - 1' or is the animation actually called 'Attack-1' (without the spaces)?
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
You could use this function:
  • Custom script: call SetUnitAnimationByIndex(YOUR_UNIT, A_NUMBER)
and replace YOUR_UNIT with a unit variable and A_NUMBER with a number. The only problem with this function is that you need to find out which number you need for your animation. The number can be from 0 to the number of animations you got-1.
 
Level 6
Joined
Mar 15, 2005
Messages
112
Also, a problem that can arise is if a units regular animations interrupt that animtion your trying to run (like if that unit is walking it can't play its attack animation). Might try pausing the unit first. That set i = 1 stuff is useless btw since there in no wait function or anything (and if there was a wait function it would still be useless in this situation).
 
Status
Not open for further replies.
Top