The effect for my spell is working but the units in the area don't get damaged. Is there something simple im missing???
Please help!!
Code:
Marks an area for an explosion after a short time, when the circle is complete all units inside the circle take massive damage.
Trigger:
- Time Bomb
- Events
- Unit - A unit Begins casting an ability
- Conditions
- (Ability being cast) Equal to Time Bomb
- Actions
- Set TimeBombPoints[361] = (Position of (Triggering unit))
- Set TimeBombTargets = (Units within 350.00 of (Position of (Triggering unit)) matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to Fals
- For each (Integer A) from 1 to 8, do (Actions)
- Loop - Actions
- Set TimeBombConvert = ((Integer A) x (360 / 8))
- Set TimeBombPoints[(Integer A)] = (TimeBombPoints[361] offset by 400.00 towards (Real(TimeBombConvert)) degrees)
- Special Effect - Create a special effect at TimeBombPoints[(Integer A)] using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
- Special Effect - Destroy (Last created special effect)
- Custom script: call RemoveLocation(udg_TimeBombPoints[bj_forLoopAIndex])
- Custom script: call DestroyGroup(udg_TimeBombTargets)
- Wait 0.15 seconds
- Loop - Actions
- Special Effect - Create a special effect at TimeBombLoc using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
- Special Effect - Destroy (Last created special effect)
- Unit Group - Pick every unit in TimeBombTargets and do (Actions)
- Loop - Actions
- Unit - Cause (Triggering unit) to damage (Picked unit), dealing (75.00 x (Real((Level of Time Bomb for (Triggering unit))))) damage of attack type Spells and damage type Normal
- Loop - Actions
- Custom script: call RemoveLocation(udg_TimeBombPoints[361])
- Custom script: call DestroyGroup (udg_TimeBombTargets)
- Events
Please help!!