hi community...I had a problem about deleting lightnings which created for multiple units in a certain area, the thing is, removing is only happening for just one lightning effect...I know i should use array or something but I don't know jass that well. But if someone can do that for me or tells me step by step how to do it, I'd be appreciated.
-
Untitled Trigger 004
-

Events
-


Unit - A unit Begins casting an ability
-
-

Conditions
-


(Ability being cast) Equal to Raise Dead
-
-

Actions
-


Set RD_Point = (Position of (Casting unit))
-


Set RD_Group = (Units within 1000.00 of RD_Point)
-


Unit Group - Pick every unit in RD_Group and do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






((Picked unit) is dead) Equal to True
-
-





Then - Actions
-






Lightning - Create a Finger of Death lightning effect from source (Position of (Triggering unit)) to target (Position of (Picked unit))
-






Set HS_effect = (Last created lightning effect)
-
-





Else - Actions
-
-
-
-
-
-
Untitled Trigger 004 Copy
-

Events
-


Unit - A unit Finishes casting an ability
-
-

Conditions
-


(Ability being cast) Equal to Raise Dead
-
-

Actions
-


Unit Group - Pick every unit in RD_Group and do (Actions)
-



Loop - Actions
-




Custom script: call DestroyLightning(udg_HS_effect)
-
-
-
-






