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

[Spell] Spell interruption

Status
Not open for further replies.
Level 12
Joined
Jul 5, 2014
Messages
551
Meh, even the simplest cases are overly complicated in the world editor. I wanted to give chain lightning a casting time, so it can be interrupted via stun, sleep or silence, but unlike Flame Strike, interruption doesn't set it on cooldown, the unit just tries again when the interruption wears off. Is there a way to fix that?
 
Level 11
Joined
Jun 2, 2004
Messages
849
I believe if you interrupt Channel then it won't go on cooldown either.

The best way to do it, afaik, would actually be to based the dummy ability off Drain Life. It's the only unit targeted channeling ability that I can recall. It also gives a detectable buff on the casting unit so you know if it's been interrupted or not when the time comes to cast the actual chain lightning.
 
Level 11
Joined
Jun 2, 2004
Messages
849
I think so, but only if they're at low life.

You can trigger CPU controlled units to cast spells by issuing the appropriate order. For simple stuff like chain lighting I usually do this every time they try to attack something.
 
Level 12
Joined
Jul 5, 2014
Messages
551
I wanted to avoid triggering. Chain Lightning was used by itself properly, but since it wasn't "channeling" it couldn't be interrupted. So, apparently, now it needs to trigger to use the dummy spell, needs to trigger to do the real spell and not get mixed up with glitches (since I need a second unit to cast the real spell). Spells are rather inflexible in world editor to modifications.
 
Level 11
Joined
May 16, 2016
Messages
730
How about make the ability to do cooldown, but while being interrupted you recover mana cost and reset the ability cooldown?
Here is almost WoW-like ability. If you need actually cooldown AFTER successful cast and you don't like this template then there is a way through period trigger which can harm the system if the spell is used by a lot of unit.
 

Attachments

  • Chain Lightning.w3x
    23.1 KB · Views: 48
Level 12
Joined
Jul 5, 2014
Messages
551
This ability would be only had by a single neutral hostile, so no chance that 2 units would use it. However, your version of Warcraft is more recent than mine and the last trigger of the finish isn't working for me. Probably because of that I see the channeling, but the lightning doesn't happen.
 
Level 12
Joined
Jul 5, 2014
Messages
551
Oh, it did not work because I used a new trigger to set the mana cost of the Chain Lightning to 0.

You could create a new Chain Lightning ability for the dummy unit, remove the mana cost, and use it here:
  • Unit - Add Chain Lightning to (Last created unit)
Still doesn't work because the dummy unit has no order to cast the spell, the trigger only gives it the ability. I tried making the dummy cast the spell on the target but I can't seem to get it right.
 
Level 12
Joined
Jul 5, 2014
Messages
551
What do you expect? Such system must have triggers and configuration for it. Just copy abilities, dummy unit and triggers in your map and be sure all triggers have same abilities and dummy units like in the template.
I wish it would be that simple, but I'm not a trigger expert and I'm pretty rusty, so I don't know what half of your triggers even do. Is it really needs a hundred trigger just to make a spell start cooldown while casting?
 
Level 12
Joined
Jul 5, 2014
Messages
551
Yeah, but I only want it to work, its not for some contest and since I don't intend to upload it, its just for fun. Its for a boss on a melee map and only a single spell, so I didn't want to overly complicate the map, given there are other triggers too and that I'm no pro.
 
Level 8
Joined
Dec 28, 2014
Messages
90
That's weird. Here's a version of what it look like when not using triggers in the new patch:

  • Channel Chain Lightning Cast
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Chain Lightning (Channel)
    • Actions
      • Set ChainLightning_Target[(Player number of (Owner of (Triggering unit)))] = (Target unit of ability being cast)
  • Channel Chain Lightning Finish
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Chain Lightning (Channel)
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Chain Lightning (Dummy) to (Last created unit)
      • Unit - Set level of Chain Lightning (Dummy) for (Last created unit) to (Level of (Ability being cast) for (Triggering unit))
      • Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning ChainLightning_Target[(Player number of (Owner of (Triggering unit)))]
      • Custom script: call RemoveLocation(udg_TempPoint)
 
Last edited:
Level 12
Joined
Jul 5, 2014
Messages
551
Thanks, it seem to work on your map and can be interrupted. Its glitchy on mine, but later try to adjust it and see its work properly.

Edit: it works for player controlled unit, but how can I make the computer to cast a channel ability? I don't see the channel among the issue order spells.
 
Level 8
Joined
Dec 28, 2014
Messages
90
Edit: it works for player controlled unit, but how can I make the computer to cast a channel ability? I don't see the channel among the issue order spells.

Computers doesn't know how to cast Channel. You need to create a trigger where every Computer hero in the map are ordered to cast the Channel ability to a nearby enemy hero.

To issue an order with a Channel ability, you must first check the Base Order ID (not the Order-String - Use/Turn On) of the ability in the Object Editor.

If the Base Order ID is "chainlightning", the order should be:
  • Unit - Order (Get Picked Unit) to Orc Far Seer - Chain Lightning (Target unit of ability being cast)
 
Status
Not open for further replies.
Top