1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Overriding Unit Animations

Discussion in 'Triggers & Scripts' started by Megafyr, Dec 25, 2010.

  1. Megafyr

    Megafyr

    Joined:
    Oct 29, 2007
    Messages:
    957
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    Is there a way to override animations that are played when a unit casts an ability? I want to control the animations using scripts. My current solution only seems to work for walking animations. I set the animation index to integer every x of game time. When I order to play a different animation, the animation just freezes.

    I need another solution. I tried disabeling the every x of game time event, in order to play the animation just once. This time the default animation triggered by the ability being cast was played instead of the one i ordered to.

    Is it possible to gain more control over unit animations? Maybe there are some abilities that do not trigger animations on the caster. In that case which would those be? :)



    PS: Also, if someone knows a clever way to get rid of command buttons on units without making them wards, so that abilities still can be casted that would be very useful to know!
     
  2. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,426
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    Well, the only way to be sure of setting an animation is SetUnitAnimationByIndex(), but I guess that is what you are using. It is weird that it is not working for you though, you should try pausing the unit first and then unpausing it afterward. Or try setting its animation to "stand" and then setting it to the appropriate index.

    As far as abilities without animations go, I'm pretty sure divine shield doesn't use an animation. Or wind walk.
     
  3. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
    you can remove the animation used by spells right? they have a field for setting the animation, just delete the string there or change it to stand...

    only the attack command can be deleted from the unit's UI... move and patrol I think is removed if you set movespeed to 0.00