call SetUnitAnimationByIndex... Burning Question

•Pooter•

Guest
When my hero casts I spell I want him to use attack - 2 animation. I tried using call SetUnitAnimationByIndex(GetTriggerUnit(), 2) and it didn't work. Can anyone help?

Code:
call SetUnitAnimationByIndex[COLOR=Orange](GetTriggerUnit(), 2) [/COLOR] 
If I put in 2 after GetTriggerUnit(),would make the unit play attack - 2 when I use Play Unit's attack Animation?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
Attack 2 doesn't necessarily have 2 as index.

Get something like wc3viewer to have a look at the model.
Or write a trigger that plays them, with a 3 or so seconds wait in between.
Preferably also telling you what index it's currently playing.
 

•Pooter•

Guest
Unfortunately I don't have wc3viewer :( , could you tell me the script that would make him play attack - 2?
 

•Pooter•

Guest
Where can I find the index it's currently playing? I can only see the Tauren Chieftain's attack - 2 animation...

EDIT: And what would the script look like if I were to change it's index to 2? Would it be call SetUnitAnimationByIndex(udg_Caster, 2) ?
 

corvusHaunt

New Member
Reaction score
96
Animation indexes are included with the model, each one is different. The 'Attack' anim might have index 5 for a Footman, but index 2 for a Peasant. Just make a script that plays unit animations when you select a unit, and shows what index it is currently showing. That, or you open up the model stuff in notepad and look at the animations, which should be listed. Look for the animation you want and copy the index :)
 

•Pooter•

Guest
But what if the index is 2? call SetUnitAnimationByIndex(udg_Caster,2) << is that correct?!? please just give me an example!
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • tom_mai78101 tom_mai78101:
    As for Github, I often frequent there, boasting about my genetic algorithm for tools-assisted speedrunning and such. I'm also pretty active on Discord, with my tag @asperatology.
  • tom_mai78101 tom_mai78101:
    Yeah, the whole earthquake + air pollution combo made me completely forget about bringing updates. I'll be sure to keep on top of things after all things are less requiring my attentions.
    +2
  • The Helper The Helper:
    I am just glad that you are OK Tom! Thank you for the update!
  • Varine Varine:
    Glad to hear you're okay! I only knew about your Github cuz I tried to follow some of you when I was learning how to program, but didn't understand any of it so kind of quit paying attention to what anyone does on it
  • The Helper The Helper:
    Freaking storm outside is kicking!
  • Blackveiled Blackveiled:
    I wouldn't know, I'm in Joliet, Illinois right now working. I left Houston area about 2 weeks ago lol
  • Blackveiled Blackveiled:
    Not permanently of course, just a temporary job.
    +1
  • jonas jonas:
    Glad you're ok @tom_mai78101
  • jonas jonas:
    @Blackveiled you know another word for permanent? temporary
    +1
  • Varine Varine:
    Briefly, he'll only be there for the interim. Like a stopgap of sorts, he'll be back home in short time
  • O Old Mountain Shadow:
    Hurray! Tom has reappeared!
  • The Helper The Helper:
    Happy Thursday!
  • Blackveiled Blackveiled:
    Yep. Just another fun night at work.
  • Varine Varine:
    Broke the nozzle on my 3d printer and I don't have another heater block. So... I guess I'm fucked on that this weekend
  • The Helper The Helper:
    that sucks i bet they are expensive
  • Varine Varine:
    Not really
  • Varine Varine:
    The entire hot end is like 20 dollars, I just can't get anymore until next week
  • Varine Varine:
    I ordered like five blocks for 15 dollars. They're just little aluminum blocks with holes drilled into them
  • Varine Varine:
    They are pretty much disposable. I have shitty nozzles though, and I don't think these were designed for how hot I've run them
  • Varine Varine:
    I tried to extract it but the thing is pretty stuck. Idk what else I can use this for
  • Varine Varine:
    I'll throw it into my scrap stuff box, I'm sure can be used for something
  • Varine Varine:
    I have spare parts for like, everything BUT that block lol. Oh well, I'll print this shit next week I guess. Hopefully it fits

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top