1. Join in on Icon Contest #17 and show your interpretation of a legendary equipment set!
    Dismiss Notice
  2. Join us in our custom games night on Saturday, June 30. We'll see you on Battle.net and Discord!
    Dismiss Notice
  3. Texturing Contest #28 has come to an end; vote for your favorite swamp dweller here! You can vote up to 3 entries.
    Dismiss Notice
  4. The Maxwell vs PrinceYaser Icon Challenge has come to a finish. See the results here!
    Dismiss Notice
  5. We've created the Staff Job Openings thread. We're currently in need of icon, video production, and social/multimedia positions to be filled. Thank you!
    Dismiss Notice
  6. Music Contest #10 Retro is out! Join us for some retro/vintage fun!
    Dismiss Notice
  7. Don't be stagnant - embrace change! The time has come to evolve and join the Techtree Contest #12 - Evolution.
    Dismiss Notice
  8. On May 20th a new law about privacy and data processing comes into work in the EU. I am no lawyer and I need help figuring out if we comply and if not, what we must do about it. Please message me if you can provide any assistance. Read more. Ralle
    Dismiss Notice

[Spell] Spell interruption

Discussion in 'World Editor Help Zone' started by WarCortez, Jun 13, 2018 at 2:04 PM.

  1. WarCortez

    WarCortez

    Joined:
    Jul 5, 2014
    Messages:
    106
    Resources:
    0
    Resources:
    0
    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?
     
  2. GIMLI_2

    GIMLI_2

    Joined:
    Mar 21, 2011
    Messages:
    1,285
    Resources:
    2
    Maps:
    2
    Resources:
    2
    There is a default option in the object data of the spell. Its actually called casting time or something similar
     
  3. WarCortez

    WarCortez

    Joined:
    Jul 5, 2014
    Messages:
    106
    Resources:
    0
    Resources:
    0
    As I said, I gave it casting time, but it just delayed it, not interrupted it. The cooldown only starts if the unit can successfully cast it.
     
  4. GIMLI_2

    GIMLI_2

    Joined:
    Mar 21, 2011
    Messages:
    1,285
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Oh, i misread your post. You would need to trigger this. Use the good old channel ability, modify it and trigger the spell.
     
  5. WarCortez

    WarCortez

    Joined:
    Jul 5, 2014
    Messages:
    106
    Resources:
    0
    Resources:
    0
    I tried with trigger, but I can't find channel among the base spells the "issue order" offers.
     
  6. apsyll

    apsyll

    Joined:
    Aug 28, 2015
    Messages:
    104
    Resources:
    1
    Maps:
    1
    Resources:
    1
    You can just change the order base of chanel to say chain lightning or any other unit target spell and use this as the order issue in the trigger
     
  7. Kaijyuu

    Kaijyuu

    Joined:
    Jun 2, 2004
    Messages:
    816
    Resources:
    0
    Resources:
    0
    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.
     
  8. WarCortez

    WarCortez

    Joined:
    Jul 5, 2014
    Messages:
    106
    Resources:
    0
    Resources:
    0
    Would the computer use a dummy drain life by itself? Channel needs scripting because it doesn't want to use it.
     
  9. Kaijyuu

    Kaijyuu

    Joined:
    Jun 2, 2004
    Messages:
    816
    Resources:
    0
    Resources:
    0
    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.
     
  10. WarCortez

    WarCortez

    Joined:
    Jul 5, 2014
    Messages:
    106
    Resources:
    0
    Resources:
    0
    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.
     
  11. orcling3

    orcling3

    Joined:
    Jul 29, 2010
    Messages:
    302
    Resources:
    2
    Maps:
    2
    Resources:
    2
    I think i can solve your problem, give me a moment, i'll edit this post with a map and some triggers for you to look at, i'll keep it simple
     
  12. Fruit Forest

    Fruit Forest

    Joined:
    May 16, 2016
    Messages:
    708
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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.
     

    Attached Files:

  13. WarCortez

    WarCortez

    Joined:
    Jul 5, 2014
    Messages:
    106
    Resources:
    0
    Resources:
    0
    I specifically need cooldown after interruption because it should be a boss ability which highly recommended to prevent.
     
  14. Fruit Forest

    Fruit Forest

    Joined:
    May 16, 2016
    Messages:
    708
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Then check my template and find the triggger INTERRUPT CASTING and remove 4 strings connected with ability and mana. Done. I thought you need more complicated MMORPG cast system.
     
  15. WarCortez

    WarCortez

    Joined:
    Jul 5, 2014
    Messages:
    106
    Resources:
    0
    Resources:
    0
    Thanks. Is there a way to simple it down? Its a hellova lot triggers.
     
  16. Glint

    Glint

    Joined:
    Dec 28, 2014
    Messages:
    42
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Here's a simpler version, but it malfunctions when cast at the same time by 2 or more units in the same player.

    If you want to eliminate the problem, you can use hashtables, unit indexers, or allocators.
     

    Attached Files:

  17. WarCortez

    WarCortez

    Joined:
    Jul 5, 2014
    Messages:
    106
    Resources:
    0
    Resources:
    0
    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.
     
  18. Glint

    Glint

    Joined:
    Dec 28, 2014
    Messages:
    42
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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)
     
  19. Fruit Forest

    Fruit Forest

    Joined:
    May 16, 2016
    Messages:
    708
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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.
     
  20. WarCortez

    WarCortez

    Joined:
    Jul 5, 2014
    Messages:
    106
    Resources:
    0
    Resources:
    0
    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.