• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Channel Ability AGAIN!

Status
Not open for further replies.
Level 10
Joined
May 21, 2006
Messages
323
So, I created a spell system similar to wow, that means that when your hero starts channeling a spell there is a progress bar showing the preparation of the spell and when the hero gets damaged he looses some of the progress. Everything works perfectly BUT at the end of the channeling the spell gets activated with a dummy unit and now I would like to learn a way how I can make my hero showing an animation (spell or attack etc.), because at the end he just stands there, this looks not so cool and "Unit - animation blabla" doesnt work either.
 
Level 14
Joined
Oct 18, 2013
Messages
724
  • Player - Player 1 (Red) skips a cinematic sequence
  • Set u = (Picked unit)
  • Custom script: call SetUnitAnimationByIndex(udg_u, udg_i)
  • Game - Display to (All players) the text: (String(i))
  • Set i = (i + 1)
i= integer, u=unit
Some other user posted this tidbit, and it comes in a lot of use. Ingame, keep pressing esc. until you find the animation you want to use. If for instance the spell animation you wanted to use was 4, when you wanted that unit to use the animation, you would use: call SetUnitAnimationByIndex(udg_*YourUnit*, 4)

Am I explaining well enough?
 
Level 10
Joined
May 21, 2006
Messages
323
  • Player - Player 1 (Red) skips a cinematic sequence
  • Set u = (Picked unit)
  • Custom script: call SetUnitAnimationByIndex(udg_u, udg_i)
  • Game - Display to (All players) the text: (String(i))
  • Set i = (i + 1)
i= integer, u=unit
Some other user posted this tidbit, and it comes in a lot of use. Ingame, keep pressing esc. until you find the animation you want to use. If for instance the spell animation you wanted to use was 4, when you wanted that unit to use the animation, you would use: call SetUnitAnimationByIndex(udg_*YourUnit*, 4)

Am I explaining well enough?

I dont want the player to be able to use an animation I want the hero to make an animation at the end of the channeling ability.
 
Level 23
Joined
Feb 6, 2014
Messages
2,466
  • Event
    • Unit - A Unit stops Channeling An Ability
  • Conditions
    • Ability being cast = yourChannelAbility
  • Actions
    • Custom script : call SetUnitAnimationByIndex(GetTriggerUnit(), x)
x is an integer value usually 1 to 9 which defines what animation
will be performed.

You can Trial and Error to find the desired animation OR you can use the the trigger by kakerate to easily find x.
 
Level 10
Joined
May 21, 2006
Messages
323
Yeah but that doesnt work, the unit doesnt play the animation, maybe if I do a 0.10 wait and then play it it could work but that would cause problems on the long term. I want to find another way. Or is this AnimationIndex thing better than just Play Unit animation?
 
Level 23
Joined
Feb 6, 2014
Messages
2,466
I cannot see how that will not work. what number did you put in the SetUnitAnimationByIndex?
Also try adding this Event

  • Event
    • Unit - A Unit stops Channeling An Ability
    • Unit - A Unit Finishes Channeling An Ability
  • Conditions
    • Ability being cast = yourChannelAbility
  • Actions
    • Custom script : call SetUnitAnimationByIndex(GetTriggerUnit(), x)
 
Status
Not open for further replies.
Top