Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Spell] Chain of Hammers

Discussion in 'World Editor Help Zone' started by Knight of Arsford, Dec 4, 2019.

  1. Knight of Arsford

    Knight of Arsford

    Joined:
    Jan 28, 2015
    Messages:
    116
    Resources:
    0
    Resources:
    0
    I want to create a custom spell based on the chain lightning. It's nothing complicated, I just want to add it for a project.

    Basically, instead of lightning, it's a hammer. I've toyed around the storm bolt and the gryphon rider missiles but I don't seem to get the "chain" effect it does.

    Also, if (Targeted Unit) refers to the initial target of the spell, how can you identify the 2nd or 3rd target that it bounces off to?
     
  2. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    3,788
    Resources:
    1
    Spells:
    1
    Resources:
    1
    “Targeted unit” is only used in “unit acquires a target” triggers. “Target unit of ability being cast” is what you want, but no there is no way to detect the secondary targets aside from guesswork with a DDS.

    You will have to code the effect yourself or use a system for it. Search for chain spells around here and you will find resources, tutorials, and old threads where how to do this is explained.
     
  3. kentzeus

    kentzeus

    Joined:
    Jul 4, 2007
    Messages:
    223
    Resources:
    0
    Resources:
    0
    Someone else did it, it's a triggered healing wave and could easily be configurated to become a chain storm bolt ability instead. I wouldn't suggest using it though, it's better if you get a proper damage detection system.
     

    Attached Files:

    Last edited: Dec 4, 2019
  4. Cespie

    Cespie

    Joined:
    May 21, 2019
    Messages:
    435
    Resources:
    0
    Resources:
    0
    Here's a basic rundown of how I'd do it:

    • Take the target unit of the spell (which is a dummy spell that does nothing)
    • Find all enemy units within the desired effect radius of the target.
    • Find the desired amount of units by detecting the closest units for each bounce.
    • Say its 4 bounces. On the first target hit, you find the closest target that hasn't already been bounced on, then you find the closest from that one, and so forth.
    • The hammers themselves are just actual storm bolt spells being cast by dummy units on the targets as they are hit
    • This means that you need an event listener that detects when the target is hit by the hammer.
    As you can see, it sounds kinda complicated, but it could be done.
     
  5. Knight of Arsford

    Knight of Arsford

    Joined:
    Jan 28, 2015
    Messages:
    116
    Resources:
    0
    Resources:
    0
    Thanks for your answers, guys! I'll try to work on it based on your suggestions.
     
  6. Devalut

    Devalut

    Joined:
    Feb 9, 2009
    Messages:
    1,455
    Resources:
    3
    Spells:
    2
    Tutorials:
    1
    Resources:
    3