• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

How to play this animation?

Status
Not open for further replies.
Level 15
Joined
Aug 14, 2007
Messages
936
Time and time again people ask about specific animations. I will not try to dig for old threads, we only need moderators on HIVe to remove them so that the fucking memory space dont fuck up like they are right now. Anyway back to the point about animations. You can use custom script to play animation by Index which I need someone else to explain as I forgot wait let me check my book . .
call SetUnitAnimationByIndex(udg_leaper, 1)
you can use GUI variable but remember to include udg_ infront that is a code that will use the GUI variable. :) Enjoy
 
Level 23
Joined
Feb 6, 2014
Messages
2,466
No, SetUnitAnimationByIndex plays the animation of a unit based on the frame sequence. So if "Stand" animation is from frame 1 to 1000 and "Walk" is from frame 1001 to 2500. Then SetUnitAnimationByIndex(unit, 0) will play "Stand" animation while SetUnitAnimationByIndex(unit, 1) plays the "Wallk" Animation. Just view the animation sequence in Mdlvis or test each index until your desired animation is played.
Note that each model file can have different frame sequence.
Therefore, index 0 may play "Stand" to some units, while it may play "Attack" or "Spell" or "Walk" to other units. It all depends on the model it is using.
 
Status
Not open for further replies.
Top