[Spell] Chain of Hammers

Status
Not open for further replies.
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?
 
Level 42
Joined
Feb 27, 2007
Messages
5,273
“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.
 
Level 7
Joined
Jul 4, 2007
Messages
249
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.
 

Attachments

  • chain heal.w3x
    19 KB · Views: 20
Last edited:
Level 8
Joined
May 21, 2019
Messages
435
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?
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.
 
Status
Not open for further replies.
Top