Trigger: Damage Target not working

DummyUnit

New Member
Reaction score
1
The effect for my spell is working but the units in the area don't get damaged. Is there something simple im missing???
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
      • 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
      • Custom script: call RemoveLocation(udg_TimeBombPoints[361])
      • Custom script: call DestroyGroup (udg_TimeBombTargets)

Please help!! :confused:
 

Komaqtion

You can change this now in User CP.
Reaction score
469
For the first, you still leak a point here:
Code:
 (Units within 350.00 of [COLOR="Red"](Position of (Triggering unit)) [/COLOR]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

Otherwise i can't see anything wrong :S
 

DummyUnit

New Member
Reaction score
1
ok i fixed that leak but its still not working :banghead:
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 TimeBombLoc = (Position of (Triggering unit))
      • Set TimeBombTargets = (Units within 350.00 of TimeBombLoc 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 False))))
      • 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
      • 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
      • Custom script: call RemoveLocation(udg_TimeBombPoints[361])
      • Custom script: call DestroyGroup (udg_TimeBombTargets)
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Oh, didin't see this before but you're destroying the group inside the loop:
Trigger:
  • Custom script: call DestroyGroup(udg_TimeBombTargets)


Need to only put that at the end :D

And also, you might wanna use different points here:
Trigger:
  • Set TimeBombPoints[361] = (Position of (Triggering unit))

and here:
Trigger:
  • Set TimeBombPoints[(Integer A)] = (TimeBombPoints[361] offset by 400.00 towards (Real(TimeBombConvert)) degrees)


instead of arrays :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top