• 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.

Substitutes to Channel ability, for Triggering purposes.

Level 6
Joined
Apr 15, 2016
Messages
118
It seems like Channel ability have some nasty limitations when it comes to using custom animations, be by Trigger or by Art - Animation. Recently in my posts some people pointed that I was using Trigger Events like Begins Casting, Begins Channeling, etc, instead of the usual Starts the effect of an Ability. Well, problem was the ability used. Channel apparently doesn't allow you to use any custom animation, not even setting by Custom Script setAnimationbyIndex.

Considering that, I'd like to know what are some replacements for Channel ability, which should include:

  • Unit Target Ability;
  • Point Target Ability (this I actually use Carrion Swarm, but if there is anything better. I dislike Shockwave because it creates Terrain Deformation, which I read it causes leaks);
  • No Target Instant (I don't like War Stomp either because apparently it creates another Terrain Deformation, which leaks);
  • Point Target but with that blue circle as aim.
 
Level 7
Joined
Mar 16, 2014
Messages
169
It seems like Channel ability have some nasty limitations when it comes to using custom animations, be by Trigger or by Art - Animation. Recently in my posts some people pointed that I was using Trigger Events like Begins Casting, Begins Channeling, etc, instead of the usual Starts the effect of an Ability. Well, problem was the ability used. Channel apparently doesn't allow you to use any custom animation, not even setting by Custom Script setAnimationbyIndex.

Considering that, I'd like to know what are some replacements for Channel ability, which should include:

  • Unit Target Ability;
  • Point Target Ability (this I actually use Carrion Swarm, but if there is anything better. I dislike Shockwave because it creates Terrain Deformation, which I read it causes leaks);
  • No Target Instant (I don't like War Stomp either because apparently it creates another Terrain Deformation, which leaks);
  • Point Target but with that blue circle as aim.

Unit Target Ability: Lightning Shield, Unholy Frenzy
Point Target Ability: Carrion Swarm, Serpent Ward
No Target Instant: Summons abilities that summon nothing. You can just put the amount of summoned units as 0.
Point Target but with the Blue Circle as aim: Healing Ward that summons a dummy with 0.01 duration, Dispel Magic
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,871
As far as I know, none of the abilities allow you to have custom Art - Animations. The same should be true about playing animations via triggers. So it has nothing to do with the Channel ability in particular.

The only way I've found to properly play your own custom animation via triggers is to use a 1 frame timer (0.00 second) to delay the animation. This is because the animation that the ability plays, and it ALWAYS plays one even if you leave the field empty, will happen AFTER your Actions. So if you do something like this:
  • Events
    • Unit - A unit Begins casting an ability
  • Conditions
  • Actions
    • Unit - Play (Triggering unit)'s spell animation
The ability will immediately interrupt that with it's own hardcoded animation.

But this should work because we've added a delay:
  • Events
    • Unit - A unit Begins casting an ability
  • Conditions
  • Actions
    • Wait 0.01 seconds
    • Unit - Play (Triggering unit)'s spell animation
Note that Waits are not even close to precise which is why I suggest the Timer. Unfortunately, timers in GUI are a pain to use so it's not a quick and easy fix. I suggest using a system that simplifies the use of timers in GUI or just manage it all through code.

Here's a link to my resource which touches on this subject and shows you exactly how to manage this problem (and more) using Jass:
Even if you're on an older version you can copy the code and modify it to work for your version, it barely uses anything new and the new stuff isn't necessary.
 
Last edited:
Level 6
Joined
Apr 15, 2016
Messages
118
Your system is exactly, what I am looking for. Problem is my World Editor doesn't open it. Data Invalid, etc. It's a Reforged map.

I actually am aware of the timer thing you're talking about. In fact, I made a very, VEEEEERY bad attempt here to Trigger Wukong's Command (from Dota 2). The Spell actually has Wukong play his animation entirely before summoning the Soldiers. I shall upload this attempt soon so that people can judge it's below average mediocrity.

Edit: in fact, how do I post maps here? Is it even allowed tho, outside of Downloads Section?
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,871
Your system is exactly, what I am looking for. Problem is my World Editor doesn't open it. Data Invalid, etc. It's a Reforged map.

I actually am aware of the timer thing you're talking about. In fact, I made a very, VEEEEERY bad attempt here to Trigger Wukong's Command (from Dota 2). The Spell actually has Wukong play his animation entirely before summoning the Soldiers. I shall upload this attempt soon so that people can judge it's below average mediocrity.
The code in that thread can be copied over to your map minus a couple of the newer functions. Or maybe just the one, see how I get the Casting Time of the ability - scrap that. Anyway, I was mostly suggesting that you look at how I handled the Timers since that's something you can do on just about any version.

Edit: in fact, how do I post maps here? Is it even allowed tho, outside of Downloads Section?
Click the Attach files button in the bottom left corner of your reply. If it's not there then I guess Hive has some pretty strict rules for when you gain access to it.
 
Last edited:
Level 6
Joined
Apr 15, 2016
Messages
118
Is it okay to simply copy a vJass Trigger and simply past like that? I still need JNGP for 1.32 World Editor, right? Or is vJass supported by now? I'm not used to vJass, but does copying it automatically create the necessary variables, like AAA_Anim_Index, AAA_Ability_Type, etc? Or I must create them beforehand?

Also, what's the ability you used for AAA_Has_Alternate_Tag, since I won't be able to copy it, I might just make it anew and just change the raw code.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,871
Is it okay to simply copy a vJass Trigger and simply past like that? I still need JNGP for 1.32 World Editor, right? Or is vJass supported by now? I'm not used to vJass, but does copying it automatically create the necessary variables, like AAA_Anim_Index, AAA_Ability_Type, etc? Or I must create them beforehand?

Also, what's the ability you used for AAA_Has_Alternate_Tag, since I won't be able to copy it, I might just make it anew and just change the raw code.
Be warned that I haven't battle tested that system beyond what can be seen in the demo map, which is just a couple of units. But theoretically it shouldn't have any issues. The Timer code is all I really suggest looking at, like linking your casting unit to the timer in a Hashtable so you can get the caster again when the timer expires.

You don't need JNGP on 1.31+. I'm no expert on this though, I came in pretty late to the scene and actually learned how to use Lua first (it's a nice upgrade from Jass). The reason I made that system in Jass is because it's the default scripting language that most people use whether they know it or not. The udg_ variables will need to be created from scratch if you want to use the system in GUI, pure code can ignore them. The ability can be based on any passive ability, I used Storm Hammers since it does nothing. You also want to set it's Art - Button positions to 0, -11 to hide it.
 
Last edited:
Level 6
Joined
Apr 15, 2016
Messages
118
But this should work because we've added a delay:
  • Events
    • Unit - A unit Begins casting an ability
  • Conditions
  • Actions
    • Wait 0.01 seconds
    • Unit - Play (Triggering unit)'s spell animation
Note that Waits are not even close to precise which is why I suggest the Timer. Unfortunately, timers in GUI are a pain to use so it's not a quick and easy fix. I suggest using a system that simplifies the use of timers in GUI or just manage it all through code.
By the way, this could be bypassed by doing a Two Triggers, one for casting, the other for looping with periodic tine, and them simply setting the counter, to 0.01, so that when it reaches 0.01 it does Action - Play Unit[mui] Animation?

EDIT: I did something like that, and apparently it is working fine tho?
  • Mauling Animation Control
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mauling
    • Actions
      • Set MaulingBegin = (MaulingBegin + 1)
      • Set MaulingCaster[MaulingBegin] = (Triggering unit)
      • Set MaulingClock[MaulingBegin] = 0.06
      • Set MaulingCounter[MaulingBegin] = 0.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MaulingBegin Equal to 1
        • Then - Actions
          • Trigger - Turn on Mauling Animation Loop <gen>
        • Else - Actions
  • Mauling Animation Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer MaulingEnd) from 1 to MaulingBegin, do (Actions)
        • Loop - Actions
          • Set MaulingCounter[MaulingEnd] = (MaulingCounter[MaulingEnd] + 0.03)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • MaulingCounter[MaulingEnd] Greater than or equal to MaulingClock[MaulingEnd]
            • Then - Actions
              • Animation - Play MaulingCaster[MaulingEnd]'s attack slam animation
              • Set MaulingCaster[MaulingEnd] = MaulingCaster[MaulingBegin]
              • Set MaulingCounter[MaulingEnd] = MaulingCounter[MaulingBegin]
              • Set MaulingClock[MaulingEnd] = MaulingClock[MaulingBegin]
              • Set MaulingBegin = (MaulingBegin - 1)
              • Set MaulingEnd = (MaulingEnd - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MaulingBegin Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions

Maul.gif
 
Last edited:
Level 45
Joined
Feb 27, 2007
Messages
5,578
Yes, that does and should work on the same principle as Uncle's frame-timer. You just need to delay it by at least 1 frame somehow, and the specific duration by which it is delayed is unimportant. Since you can't attach data to a timer like a JASS/Lua solution would do, storing that same data in parallel arrays is the GUI solution.
 
Top