• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Controlling targets in Chain/Forked Lightning

Status
Not open for further replies.
Level 11
Joined
Feb 14, 2009
Messages
884
So, here's the deal. I want to make a spell based on either Chain Lightning or Forked Lightning (both will suit me, so I don't really mind) and I want to be able to CHOOSE each of the spell's target. Let me describe what I want to do. I'm making a TD map, and mobs spawn at 4 different locations. Mobs spawned on one location have a different index number than mobs spawned in another location. The spell I'm talking about should kill mobs with a specific index number other than all of them. I was thinking of creating two dummy units that would be teleported between two mobs and create a chain lightning effect between them, as if the mob itself was hit, BUT this solution isn't neat. Chain Lightning uses a "smart" way to find its next target, meaning that it will pick the closest to its current target rather than the random unit triggers will pick.

Thank you.
 
Level 11
Joined
Feb 14, 2009
Messages
884
Aha, so all I have to do is to add a check on chainFilter for the index number, right? There are a few other things that I need to include, but I think I can handle it.
JASS:
requires SpellHelper
Do I only need to include the script and SpellHelper for the spell to work, or are there any other requirements?
 
Status
Not open for further replies.
Top