• 🏆 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!

[Spell] Channel + Cast Time Animation

Status
Not open for further replies.

sentrywiz

S

sentrywiz

Hi all.

I have a channel spell with:

Data - Art Duration: 0.00
Data - Follow Through Time: 1.20
Stats - Cast Time: 2.50
Art - Animation Names: Attack Slam

What I want is while the unit is "casting" the spell, aka the 2.5 seconds pass it to cast one animation and when the spell finishes casting, its attack slam animation to launch.

I've tried with triggers, with animation names but the unit either doesn't animate at all or it tries to do all animations when the spell finishes casting. All my other channel spells work but they don't have a cast time.

Anyone knows how to make this work?
 
Level 15
Joined
Oct 29, 2012
Messages
1,474
As far as I understood from your problem. Something is interrupting your animation maybe?

You make first trigger, when the casting begins , play the animation by index :
  • Custom script: call SetUnitAnimationByIndex(unit, index)
A second trigger when casting time finishes, play another animation by another index.
 
Level 10
Joined
May 21, 2006
Messages
323
As far as I understood from your problem. Something is interrupting your animation maybe?

You make first trigger, when the casting begins , play the animation by index :
  • Custom script: call SetUnitAnimationByIndex(unit, index)
A second trigger when casting time finishes, play another animation by another index.

What is the difference, there I've got the same problem and why would it be different if he just plays the animation with an index?
 

sentrywiz

S

sentrywiz

Use the casting animation in the ability's data field, and the when "A unit finishes casting an ability", use the custom script for the spell slam animation.

The unit doesn't animate with any animation while there is a cast time. And I want a cast time
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
What if you used a hidden channel ability. When you cast the real channel, override the issued order with the hidden ability's order. The hidden ability does nothing but makes the hero play an animation. When that ability starts its effect, order the unit to cast the real ability and don't interrupt it this time. Use the custom script at the end.
 
The problem is that the "cast time" duration of channel based spells is never animated in the game (does not only apply to channel). You need to trigger it, but it's fairly easy to do. Just use the begin spellcasting event and run and queue the cast animation.

Use the casting animation in the ability's data field, and the when "A unit finishes casting an ability", use the custom script for the spell slam animation.
This doesn't work. He actually needs to do the opposite. The ability animation data field fires when the "follow through time" segment starts, not when the cast time segment starts.
 

sentrywiz

S

sentrywiz

What if you used a hidden channel ability. When you cast the real channel, override the issued order with the hidden ability's order. The hidden ability does nothing but makes the hero play an animation. When that ability starts its effect, order the unit to cast the real ability and don't interrupt it this time. Use the custom script at the end.

That sounds unnecessarily complicated. You mean issue an order to the unit when it starts to channel the dummy channel ability so it kind of gets "stuck" doing the animation?

The problem is that the "cast time" duration of channel based spells is never animated in the game (does not only apply to channel). You need to trigger it, but it's fairly easy to do. Just use the begin spellcasting event and run and queue the cast animation.

Use the casting animation in the ability's data field, and the when "A unit finishes casting an ability", use the custom script for the spell slam animation.

This doesn't work. He actually needs to do the opposite. The ability animation data field fires when the "follow through time" segment starts, not when the cast time segment starts.

Okay guys here is the detailed description of the spell. Maybe this will clear some of the things up.

I have this model: RiflemanElite and I want to make (based on your knowledge) LoL: Caitlyn's Ultimate or Dota: Dwarven Sniper's ultimate.

So I need this unit to cast its Stand 3 animation for 2.5 seconds and then its Attack Slam animation.

I've tried:

- Setting the art animation (with cast time) / didn't work
- Triggered "when unit starts/begins casting/channeling" / didn't work

Right now the only idea I have is:

1. The main ability of the unit will be dummy, it won't do anything and it will have no animation. Save the target in variable
2. The main ability will trigger a second ability to be added to the unit, I guess another Channel ability with no icon and force the unit to cast it
3. Make a trigger "unit finishes casting an ability" for the dummy channel and run attack slam animation for the casting unit. Also remove the dummy channel ability
 
So I need this unit to cast its Stand 3 animation for 2.5 seconds and then its Attack Slam animation.

I've tried:

- Setting the art animation (with cast time) / didn't work
- Triggered "when unit starts/begins casting/channeling" / didn't work
The second approach definitely works. However, you might need to apply a 0 second delay inbetween the begin spellcasting event and the animation, as the ability itself will issue a stand animation when it begins casting and you need to overwrite that.

Also, to play "Stand 3", you need to use "play animation by index". The ordinary "play animation" doesn't work, as it doesn't allow you to play a number-specific animation. If you make it play "Stand 3", it will only play a random stand animation, not the particular third stand. You can work around this by renaming the "stand 3" animation to something else via Magos.
 

sentrywiz

S

sentrywiz

The second approach definitely works. However, you might need to apply a 0 second delay inbetween the begin spellcasting event and the animation, as the ability itself will issue a stand animation when it begins casting and you need to overwrite that.

Also, to play "Stand 3", you need to use "play animation by index". The ordinary "play animation" doesn't work, as it doesn't allow you to play a number-specific animation. If you make it play "Stand 3", it will only play a random stand animation, not the particular third stand. You can work around this by renaming the "stand 3" animation to something else via Magos.

So that's why none of the triggers worked. I used the standard
play animation. I didn't know that. Nor did I understood how to
play an animation with numbers on it.

Thanks so much. +rep
 
Status
Not open for further replies.
Top