1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
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 at 6:50 AM.

  1. Knight of Arsford

    Knight of Arsford

    Joined:
    Jan 28, 2015
    Messages:
    96
    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,151
    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. Sk0gsHu[GG]arN

    Sk0gsHu[GG]arN

    Joined:
    Jul 4, 2007
    Messages:
    158
    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 at 9:37 PM
  4. Cespie

    Cespie

    Joined:
    May 21, 2019
    Messages:
    385
    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.