• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Animation Index trigger

Status
Not open for further replies.
Level 10
Joined
Apr 4, 2010
Messages
509
Just make a trigger that creates X amount of units of the same model, assign them with their own custom value and add them to a group. Then create another trigger, whenever you press esc, all units in the group with play their animation index of their custom value and display it as floating text. It's just like Maker's Lightning Test
 
Level 19
Joined
Apr 21, 2013
Messages
1,194
I found that unit animations are listed correctly in Mdlvis, not in Magos editor. In Magos the animations are listed alphabetically. You can count how many animations are listed in the list of animation(for example 10), then scroll down ONE list size (now it's 20) and go on like this. And the animations are counted from "ALL LINE" animation meaning that if you want to take the "Attack 1" animation and assuming it is the first animation after "All line" normally it should be setUnitAnimationByIndex(gg_Unit_xxxxxx, 1) but you must write animation number + 1 = setUnitAnimationByIndex(gg_Unit_xxxxxx, 2)
 
Level 7
Joined
Nov 19, 2015
Messages
283
This is what I used when I had a model with 250ish animations.

  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing 0 as A substring
      • Player - Player 1 (Red) types a chat message containing 1 as A substring
      • Player - Player 1 (Red) types a chat message containing 2 as A substring
      • Player - Player 1 (Red) types a chat message containing 3 as A substring
      • Player - Player 1 (Red) types a chat message containing 4 as A substring
      • Player - Player 1 (Red) types a chat message containing 5 as A substring
      • Player - Player 1 (Red) types a chat message containing 6 as A substring
      • Player - Player 1 (Red) types a chat message containing 7 as A substring
      • Player - Player 1 (Red) types a chat message containing 8 as A substring
      • Player - Player 1 (Red) types a chat message containing 9 as A substring
    • Conditions
    • Actions
      • Set unit = Hero[1]
      • Set i = (Integer((Entered chat string)))
      • Game - Display to (All players) the text: (String(i))
      • Custom script: call SetUnitAnimationByIndex( udg_unit,udg_i)
 
Status
Not open for further replies.
Top