HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to get every unit that was hit by chain lightnin spell ?

07-16-2007, 04:17 PM#1
DarthRevansith
I was thinking that i oculd make soem nice spells like for example "death chain". dummys would be created to use death coild at every unit hit by the "lighning". but for this i would need to get every unit hit by the lighting. how can i do that ?
07-16-2007, 04:37 PM#2
Histenchist
The only way I can figure out is this:

First make a trigger:
Trigger:
Stuff
Events
Collapse Conditions
(Unit-type of (Damage source)) Equal to yourunit
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Current order of (Damage source)) Equal to (Order(chainlightning))
Collapse Then - Actions
Game - Your Actions
Else - Actions

Then you gotta have a event:

Trigger:
Other Stuff
Collapse Events
Time - Elapsed game time is 0.00 seconds
Conditions
Collapse Actions
Collapse Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Collapse Loop - Actions
Trigger - Add to Stuff <gen> the event (Unit - (Picked unit) Takes damage)

Tis sould wurk... look im talking like you :D
07-16-2007, 04:47 PM#3
Captain Griffen
A much simpler and more accurate method of doing it would be to trigger the chain lightning. That's the only accurate way to do it to my knowledge.
07-16-2007, 05:24 PM#4
blu_da_noob
And we already have a tutorial to help you to do it in GUI: http://www.wc3campaigns.net/showthread.php?t=86307 . If you use JASS I don't think you would need a tutorial.