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

How to loop attack animation?

Status
Not open for further replies.
Level 14
Joined
Apr 13, 2016
Messages
378
When I try to loop attacking animation for cinematic they just attack 1 time and thats all, even If I add -looping to animation list, the only solution that I found is to just make alot of -Play Animation sequences.
pls halp
 
Level 15
Joined
Mar 25, 2016
Messages
1,327
You could make a perodic trigger that plays the animation. Just turn it on and off to start/stop the animation.
 
Level 10
Joined
Sep 16, 2016
Messages
269
1) You can use channel ability with attack animation, "Follow through time" should be high. Order unit to use spell on cinematic.
2) Queue attack animation with loop actions:
  • For each (Integer A) from 1 to 7, do (Actions)
  • Loop - Actions
  • Animation - Queue Paladin's attack animation
 
Level 14
Joined
Apr 13, 2016
Messages
378
Can you link me to "how to insert triggers in your reply's" guide?
Oh nvm found it.
2017-02-02_21-53-40.png


I guees that will do?
 
Last edited:
Level 15
Joined
Mar 25, 2016
Messages
1,327
The periodic time should be as long, as one animation lasts, so he can play the full animation. Therefor you need a quite high periodic time (most animations are about one second).

The problem is, that if you have a long periodic time, you do not know when the periodic trigger runs.
Once turned on it can take up to one periodic time until the trigger runs for the first time.

You can solve this problem by using a small periodic time and a counter, to only start the animation when you need it.

  • Immediate attacking
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Counter Equal to 0
        • Then - Actions
          • Animation - Play Footman 0000 <gen>'s attack animation
          • Set Counter = 9
        • Else - Actions
          • Set Counter = (Counter - 1)
This trigger will play the animation once per second, but once turned on it will take a maximum of 0.10 seconds until the animation starts.
 
Level 11
Joined
May 16, 2016
Messages
730
When I try to loop attacking animation for cinematic they just attack 1 time and thats all, even If I add -looping to animation list, the only solution that I found is to just make alot of -Play Animation sequences.
pls halp
Use "Channel" ability. It allow to loop animation OR you can use this template to find index of requierd animation and according to the EXAMPLE trigger implement it into your map when you find a proper index.
to order to play animation just select units and type in the chat -anim xx where xx = 0....99
 

Attachments

  • CHECK ANIMATION BY INDEX.w3x
    12.8 KB · Views: 49
Last edited:
Status
Not open for further replies.
Top