Hi! I've been trying to remove the special effects that was created in a unit group (create special effect for (picked unit) ). I used loop(Integer A) but only one effect was removed and the other units still has the special effect. I'm not really sure on how to use loops or something I just thought that it might work and since it doesn't I decided to get help here.
Here is the trigger:
Thanks
Here is the trigger:
-
SoulBurnactivate
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Soul Burn
-
-

Actions
-


Set Doomguard[1] = (Triggering unit)
-


Set SoulBurnTargetLoc = (Target point of ability being cast)
-


Custom script: call TriggerSleepAction(0.02)
-


Set SoulBurnUnitGroup = (Units within 300.00 of SoulBurnTargetLoc matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of Doomguard[1])) Equal to True) and ((((Matching unit) is A structure) Not equal to True) and (((Matching unit
-


Set SoulBurnUnitCount = (Number of units in SoulBurnUnitGroup)
-


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



Loop - Actions
-




Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Doom\DoomTarget.mdl
-




For each (Integer A) from 1 to SoulBurnUnitCount, do (Actions)
-





Loop - Actions
-






Set SoulBurnsfx[(Integer A)] = (Last created special effect)
-
-
-
-
-


Custom script: call TriggerSleepAction(5.00)
-


For each (Integer A) from 1 to SoulBurnUnitCount, do (Actions)
-



Loop - Actions
-




Special Effect - Destroy SoulBurnsfx[(Integer A)]
-




Custom script: call DestroyGroup(udg_SoulBurnUnitGroup)
-
-
-


Custom script: call RemoveLocation(udg_SoulBurnTargetLoc)
-
-

