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

[Solved] How can i create dummy channel system?

Level 17
Joined
Jun 2, 2009
Messages
1,139
Hello. I need to create something like this.
When you click on the ability, hero starts the channel animation.
This channel stops/aborted with these conditions

  • When the caster dies
  • When the caster gets stunned (not necessary but it would be great)

--- Second part is aborting ---

If the user wants to stop channel, how can i do this?

Important part is, i am givin the hero to EXTRA ability in empty slot, and i will remove this ability when the channel stops.
All ability slots are full and how can i make it can be stopped if the user wants? I am thinking about the ESC but you can suggest another options
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,552
What you described is how every Channeling ability in the game works.

Channeled abilities can be stopped by issuing a Stop order and I believe by issuing a direct order to do something else (smart orders are ignored I think). They'll also stop casting when the caster is interrupted, since obviously a dead unit cannot keep casting a spell and a stunned unit cannot take any actions.

Here's how you would trigger the ability:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • Put your Channel ability here
  • Actions
    • Unit - Add EXTRA ability to (Triggering unit)
  • Events
    • Unit - A unit Stops casting an ability
  • Conditions
    • Put your Channel ability here
  • Actions
    • Unit - Remove EXTRA ability from (Triggering unit)
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,552
The Channel ability can be used to make any kind of ability, but it's primary function is for channeling effects.


It's basically the "custom ability" template, which you use with triggers to make your own custom spells.

Some other channeling abilities you could possibly use as the base ability:
Blizzard, Death and Decay, Cannibalize, Big Bad Voodoo, Tranquility, Earthquake, Starfall, Healing Spray, Cluster Rockets, Volcano, Monsoon, Tornado
 
Level 17
Joined
Jun 2, 2009
Messages
1,139
Wait. I have a serious problem in here @Uncle

During the channel i am adding ability. But when i use this ability, channel stops and ability removes :)
Hero can use this added ability as much as he wants except getting killed, moved or stunned. How can i make it?
  • Arcane Blast Ac
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Arcane Blast //
    • Actions
      • Unit - Add Arcane Blast // to Hero_Archmage
  • Arcane Blast AcKapa
    • Events
      • Unit - A unit Stops the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Arcane Blast //
    • Actions
      • Unit - Remove Arcane Blast // to Hero_Archmage
I want to use added ability as much as i want in here. But i am talking about this ability. Not the other abilities.
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,552
You can't cast a non-Instant ability without interrupting channeling. Like I said, your options are the Instant abilities like Wind Walk or Berserk.

However, it's possible to trigger everything yourself and create your own channeling system. I doubt anything like that exists already.

Also, what kind of ability is Arcane Blast exactly?
 
Last edited:
Level 17
Joined
Jun 2, 2009
Messages
1,139
Hero starts channeling for the Arcane Blast. (Ability appears on different slot with F shortcut)
During the channel, hero can use Arcane Blast (based on channel) ability within 1250 range.
Arcane Blast is the ability with 2 seconds cooldown.
Channel stops if the hero moves or stunned.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,552
So what ability is Arcane Blast? Storm Bolt? Shockwave? I'm assuming you target Units with it.

Anyway, what you could try to do is detect the Order issued to cast Arcane Blast and somehow interrupt it without disabling the channeling (may not be possible), then have a Dummy unit cast Arcane Blast on the target. Then manually start the cooldown/spend mana to mimic the behavior of casting it.

Alternatively, you fake the channeling behavior and control which Orders can and cannot happen, which would be a somewhat advanced system.

Edit:
Here's what I came up with, unfortunately there's no Instant - Target Unit ability:
  • AB Channel Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Arcane Blast (Channel)
    • Actions
      • Set VariableSet AB_Caster = (Triggering unit)
      • Set VariableSet AB_CV = (Custom value of AB_Caster)
      • -------- --------
      • Unit - Add Arcane Blast (Launch) to AB_Caster
      • -------- --------
      • Set VariableSet AB_Point = (Position of AB_Caster)
      • -------- --------
      • Unit - Create 1 Dummy for (Owner of AB_Caster) at AB_Point facing Default building facing degrees
      • Set VariableSet AB_Dummy[AB_CV] = (Last created unit)
      • Unit - Add Arcane Blast (Dummy) to AB_Dummy[AB_CV]
      • -------- --------
      • Custom script: call RemoveLocation( udg_AB_Point )
  • AB Channel Stop
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Arcane Blast (Channel)
    • Actions
      • Set VariableSet AB_Caster = (Triggering unit)
      • Set VariableSet AB_CV = (Custom value of AB_Caster)
      • -------- --------
      • Unit - Remove Arcane Blast (Launch) from AB_Caster
      • Unit - Remove AB_Dummy[AB_CV] from the game
  • AB Launch
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Arcane Blast (Launch)
    • Actions
      • Set VariableSet AB_Caster = (Triggering unit)
      • Set VariableSet AB_CV = (Custom value of AB_Caster)
      • -------- --------
      • Set VariableSet AB_Point = (Position of AB_Caster)
      • Set VariableSet AB_Group = (Units within 1250.00 of AB_Point.)
      • -------- --------
      • Unit Group - Pick every unit in AB_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
              • ((Picked unit) belongs to an enemy of (Owner of AB_Caster).) Equal to True
              • ((Picked unit) is A structure) Equal to False
              • ((Picked unit) is invulnerable) Equal to False
            • Then - Actions
            • Else - Actions
              • Unit Group - Remove (Picked unit) from AB_Group.
      • -------- --------
      • Unit - Order AB_Dummy[AB_CV] to Human Mountain King - Storm Bolt (Random unit from AB_Group)
      • -------- --------
      • Custom script: call RemoveLocation( udg_AB_Point )
      • Custom script: call DestroyGroup( udg_AB_Group )
So whenever you cast Arcane Blast (Launch) a Storm Bolt will fire at a random nearby enemy unit.

Arcane Blast (Channel) is based on Channel.
Arcane Blast (Launch) is based on Berserk.
Arcane Blast (Dummy) is based on Storm Bolt.

This is using a Unit Indexer but it's not necessary. Instead, you could create the Dummy unit in the AB Launch trigger and add a short Expiration Timer to it.
 
Last edited:
Top