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

Adding Custom Animation When Using Channel Ability

Level 10
Joined
Sep 3, 2009
Messages
458

Adding Triggered Animation When Using Channel Ability



So I have always wanted to this kind of thing. I did once accidentally but failed to replicate it. But because of a good friend, Adiktuz, I finally made it work.

Firstly . . .


As all of us map makers know, the channel ability is so useful, because of all it's given features. Of practically being any ability you'd ever want it to be. But then I had this problem as I ventured into this ability.

The Problem . . .


Basically as channel is too good to be true(nah!) I found out that you can't put a custom tiggered animation with channel. For example when you cast channel, then trigger an animation it will have a small transition with the basic anim and triggered anim.

Also even if you put follow through time zero there is still the small transition in which is very ugly.

The Solution

Well I don't know if people know about this already but for the sake of those who don't, I shall show you how to "Add Custom Animation When Using Channel Ability"


1. Setting Up Channel


First, you need to set these values on the channel ability:

1.Data - Art Duration - 0.00 (Dunno what it does but meh better safe than sorry)
2.Data - Disable Other Abilities - false(You won't want to do this :D)
3.Data - Follow Through Time - 0.00(Well basically but it doesn't matter really just better set it to 0)
4.Data - Options - Visible(Makes the ability show up in the command card)
5.Data - Target Type - [insert what you want here] (It doesn't matter what you put, the triggered animation will run perfectly whether target unit, target point, no target)

Guide Image
TutChannel.png


2. Setting Up The Units


Second you need to set this to any unit that might use channel:

1. Art - Animation - Cast Point - 0.00

Remember to do this to any and all units that might use channel. This is basically the thing that let's the triggered animation run smoothly.

Guide Image
TutCastPoint.png


NOTE: By doing this other abilities that this unit uses, besides channel, will be affected.

3. Triggering The Animation


Now all the last part to be done is to trigger the animation. Well before you go rushing to the close button on your tab, there's a little trick so that the animation will work.

When you animate, you need to do these actions in sequence:

When Spell Is Cast >> PAUSE UNIT >> PLAY ANIM >> UNPAUSE UNIT

GUI EXAMPLE

  • Animation
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Channel
    • Actions
      • Unit - Pause (Triggering unit)
      • Animation - Play (Triggering unit)'s attack animation
      • Unit - Unpause (Triggering unit)
NOTE: You need to do this in order for the animation to work.

3. Enjoyment and Other Notes


Once that is done enjoy all the possibilities. Although remember that since the Cast Point set to 0, all abilities that your unit will be using will be affected. I don't know what'll happen though, I will test later. Also Channeling won't work as you have seen in the trigger, it will pause the unit, basically cancelling the ability. But none the less , use it in your discretion.

Special thanks to Adiktuz for giving me an answer that lead me to the answer.

Thanks For Reading

 
Last edited by a moderator:
Level 37
Joined
Mar 6, 2006
Messages
9,240
Basically as it is too good to be true I found out that you can't trigger a custom animation with channel.

By custom animation, you mean any default animation by original WC3 unit, not an all custom, created by some forum member for example, animation?


  • Although remember that since the Cast Point set to 0, all abilities that your unit will be using will be affected. I don't know what'll happen though, I will test later.
Cast point defines the time between
  • Unit - A unit Begins casting an ability
and
  • Unit - A unit Starts the effect of an ability
Let's say you've triggered a spell that uses "Starts the effect..".

Usually when cast point it's at a default value (about 0.3-0.5 seconds), the caster has time to face the unit it targeted even if it's facing 180° away from it when it begins the casting. But if the cast point is 0, the caster is can be facing whatever angle, not the target. This is especially harmful if your triggered spell uses the facing of the caster.
 
Level 10
Joined
Sep 3, 2009
Messages
458
Yes I should have put Triggered Animation. I just remembered this morning. I need to check on it more.

Also do you mean to say that Cast Point is actually a time for a unit to face the target? I didn't know that again thanks on the info. I'll try and see what I can discover.

EDIT: The ability and animation works fine. But I see no problem with spells using the facing of the unit. Please elaborate.

EDIT: I think I get what you mean. What if the channel is a point target spell for example dash. You need to cast it at a direction but uses the unit facing as an angle.

Well these cases are uncommon(?) What I have to say is use it a your discretion. This method prevents for example channeling spells though channel ability (the follow through time) as it cancels the ability, but there are other ways to simulate a channel. And on that note there are also ways that we can simulate a cast point.

It depends on how much someone wants to utilize the channel, animation wise. BUt I have to say I like the power to add triggered anims.
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,240
Also do you mean to say that Cast Point is actually a time for a unit to face the target?
No. But with lower cast point time, the unit has less time to face the target before "Starts the effect..." triggers.

But I see no problem with spells using the facing of the unit. Please elaborate.

Cast a point targeted ability, like Shockwave, behind the hero while having 0.00 cast point. Use this trigger.
  • Untitled Trigger 007
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Unit - Create 1 Mortar Team for Player 1 (Red) at ((Position of (Triggering unit)) offset by 300.00 towards (Facing of (Triggering unit)) degrees) facing Default building facing degrees
 
Level 10
Joined
Sep 3, 2009
Messages
458
No. But with lower cast point time, the unit has less time to face the target before "Starts the effect..." triggers.



Cast a point targeted ability, like Shockwave, behind the hero while having 0.00 cast point. Use this trigger.
  • Untitled Trigger 007
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Unit - Create 1 Mortar Team for Player 1 (Red) at ((Position of (Triggering unit)) offset by 300.00 towards (Facing of (Triggering unit)) degrees) facing Default building facing degrees

So technically the the cast point is like a time given to the unit before it can cast. So that it has time to turn ok got it.

Oh lookie my previous post.
 
Level 25
Joined
Feb 2, 2006
Messages
1,669
I've found this thread and I get the same issue as the others. When pausing/unpausing the unit the trigger seems to be triggered again and again. Even when I disable and enable it.
Is there any better solution?
The only solution which works for me is disabling the trigger waiting 0.0 and enabling again but I don't want any delay.
 
Level 10
Joined
Sep 3, 2009
Messages
458
I've found this thread and I get the same issue as the others. When pausing/unpausing the unit the trigger seems to be triggered again and again. Even when I disable and enable it.
Is there any better solution?
The only solution which works for me is disabling the trigger waiting 0.0 and enabling again but I don't want any delay.

Hey there Barade! This is a pretty old tutorial of mine and after going back to modding I have noticed that the Pause - Stop - Unpause doesn't seem to work for me as well. (Since I'm still using the technique but I dont use the pause - stop - unpause anymore)

The alternative I'm using right now is - instead of pausing the unit, I created code to [Stun] the unit using a Modified Firebolt. This seems to do the trick for me. Also I suggest playing with the Events for spell casting (Starts the effect, Ends the effect, Casting the effect etc.), there seems to be a combination that works.


Code:
//----------------------------------------------------------------------------
// Judgement v0.1
//----------------------------------------------------------------------------
//
//  Judgement is a small library with the goal to create a delay when actions
//  are activated and also play a specific animation after it.
//
//----------------------------------------------------------------------------

library Judgement
    //------------------------------------------------------------------------
    //Setup
    //------------------------------------------------------------------------
    globals
    endglobals

    //------------------------------------------------------------------------
    //Main Functions
    //------------------------------------------------------------------------
    function Delay takes unit u returns nothing
        local real x = GetUnitX(u)
        local real y = GetUnitY(u)
        local unit t = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'u001',x,y,bj_UNIT_FACING)
       
        call UnitApplyTimedLifeBJ( 0.50, 'BTLF', t)
        call IssueTargetOrderBJ( t, "firebolt", u )
        call SetUnitAnimation( u, "attack" )
       
        call BJDebugMsg("System: Delay")
    endfunction

endlibrary

It's a quick a dirty code for testing. Although I haven't tested it in a while (Been coding some other stuff currently). I really should update this thread.
 
Top