• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Chain Lightning

Status
Not open for further replies.
Level 10
Joined
Jun 10, 2007
Messages
557
Sorry if this goes in Spells and Systems, but I thought it was more of a general thing. *shrug*

Is there a way to detect units who are affected by the bouncing effect of Chain Lightning? How about Healing Wave? (I'd assume it's the same thing, but you never know) I also need to be able to refer to the unit later. Super duper bonus points if it's possible to refer to them in the order they were affected (ie first bounce, second bounce, etc.), although it's not required.

Thanks in advance.
 
Level 12
Joined
Mar 16, 2006
Messages
992
Sorry if this goes in Spells and Systems, but I thought it was more of a general thing. *shrug*

Is there a way to detect units who are affected by the bouncing effect of Chain Lightning? How about Healing Wave? (I'd assume it's the same thing, but you never know) I also need to be able to refer to the unit later. Super duper bonus points if it's possible to refer to them in the order they were affected (ie first bounce, second bounce, etc.), although it's not required.

Thanks in advance.

I'm no editor guru, but couldn't you give chain lightning a buff ("being zapped by chain lightning").

Unit starts effect of a spell, spell is chain lightning, turn on a buff watcher trigger. Every .01s + unit has buff (chain lightning), DO WHATEVER YOU WANT and cycle really fast for X seconds and then turn itself off?

You could use a decreasing or increasing loop to do more/do less (whatever you want) to the first unit it hits.
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
Since you're asking for a way to detect targets of a spell, I guess it can remain in the Help Zone.

And you might as well detect the nearest unit, which requires JASS I believe. At least it might be easier with JASS, getting the nearest unit of the main target. Then that unit is the target, so get the nearest unit of the target again... yeah, it's confusing.
 
Level 10
Joined
Jun 10, 2007
Messages
557
I'm no editor guru, but couldn't you give chain lightning a buff ("being zapped by chain lightning").

Unit starts effect of a spell, spell is chain lightning, turn on a buff watcher trigger. Every .01s + unit has buff (chain lightning), DO WHATEVER YOU WANT and cycle really fast for X seconds and then turn itself off?

You could use a decreasing or increasing loop to do more/do less (whatever you want) to the first unit it hits.

In the midst of trying this out... one thing, though. Would saving the casting unit in a global variable when the spell is cast and then referring to the global in the buff watcher work? In my map it's pretty important for people to get credit for kills.
 
Level 12
Joined
Mar 16, 2006
Messages
992
In the midst of trying this out... one thing, though. Would saving the casting unit in a global variable when the spell is cast and then referring to the global in the buff watcher work? In my map it's pretty important for people to get credit for kills.

If you wanted to keep track, it'd just be a seperate counting trigger.

I would just have a trigger for unit dies = add to kill score. If you wanted to keep track of hero kills too, it'd just be a similar counting trigger except with unit is a hero condition.

You don't really need to save the casting unit for what I did. You can, but with the way kill counts work, you really don't have to.
 
Status
Not open for further replies.
Top