• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Problem with spell, it damages only once.

Status
Not open for further replies.
Level 7
Joined
Jul 7, 2008
Messages
332
Hello.
I downloaded Ice Shard by SSDBZ.
Ice Shard - The Hive Workshop - A Warcraft III Modding Site
I imported it to my map and it works fine theres just only 1 problem.
It damages a unit only once, means if I use it on unit the units get 100 dmg for example the next time I use it on the same unit it does 0 damage.

I don't know whats the problem, please help.
I'm sure its something in the trigger, I tried to change abilities in F6 didn't help.

  • Ice Shard
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Ice Shard
    • Actions
      • Set LocPoint1 = (Position of (Casting unit))
      • Set LocPoint2 = (Target point of ability being cast)
      • Set LocPoint3 = (LocPoint1 offset by 50.00 towards (Angle from LocPoint1 to LocPoint2) degrees)
      • Set TempUnitGroup = (Units within 512.00 of LocPoint1 matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
        • Loop - Actions
          • Camera - Shake the camera for (Owner of (Picked unit)) with magnitude (Real(((Level of (Ability being cast) for (Casting unit)) x 2)))
          • Camera - Sway the camera target for (Owner of (Picked unit)) with magnitude (Real(((Level of (Ability being cast) for (Casting unit)) x 3))) and velocity 200.00
      • Custom script: call DestroyGroup( udg_TempUnitGroup )
      • Special Effect - Create a special effect at LocPoint3 using Objects\Spawnmodels\NightElf\NEDeathSmall\NEDeathSmall.mdl
      • Set Spec1 = (Last created special effect)
      • Special Effect - Create a special effect at LocPoint3 using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
      • Set Spec2 = (Last created special effect)
      • Unit - Create 1 Ice Shard for (Owner of (Casting unit)) at LocPoint3 facing (Angle from LocPoint1 to LocPoint2) degrees
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Animation - Change (Last created unit)'s size to ((250.00 + (Real(((Level of (Ability being cast) for (Casting unit)) x 10))))%, (250.00 + (Real(((Level of (Ability being cast) for (Casting unit)) x 10))))%, (250.00 + (Real(((Level of (Ability being cast) for (Casting unit)) x 10))))%) of its original size
      • Custom script: call RemoveLocation( udg_LocPoint3 )
      • Set LocReal = ((Real((Intelligence of (Casting unit) (Include bonuses)))) x 4.00)
      • Unit - Order (Last created unit) to Move To LocPoint2
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Set LocPoint3 = (LocPoint1 offset by ((Real((Integer A))) x 200.00) towards (Angle from LocPoint1 to LocPoint2) degrees)
          • Unit - Create 1 Dummy Boom for (Owner of (Triggering unit)) at LocPoint3 facing Default building facing degrees
          • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
          • Set TempUnitGroup = (Units within 300.00 of LocPoint3 matching ((((Owner of (Matching unit)) is an ally of (Owner of (Triggering unit))) Equal to False) and (((Matching unit) is An Ancient) Equal to False)))
          • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
            • Loop - Actions
              • Unit - Cause (Last created unit) to damage (Picked unit), dealing LocReal damage of attack type Normal and damage type Normal
              • Unit - Add classification of An Ancient to (Picked unit)
          • Custom script: call DestroyGroup( udg_TempUnitGroup )
          • Custom script: call RemoveLocation( udg_LocPoint3 )
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Set LocPoint3 = (LocPoint1 offset by ((Real((Integer A))) x 200.00) towards (Angle from LocPoint1 to LocPoint2) degrees)
          • Set TempUnitGroup = (Units within 300.00 of LocPoint3 matching ((((Owner of (Matching unit)) is an ally of (Owner of (Triggering unit))) Equal to False) and (((Matching unit) is An Ancient) Equal to False)))
          • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
            • Loop - Actions
              • Unit - Remove classification of An Ancient from (Picked unit)
          • Custom script: call DestroyGroup( udg_TempUnitGroup )
          • Custom script: call RemoveLocation( udg_LocPoint3 )
      • Set LocPoint3 = (LocPoint1 offset by ((Real((Integer A))) x 375.00) towards (Angle from LocPoint1 to LocPoint2) degrees)
      • Environment - Create a 3.00 second wave deformation from LocPoint1 to LocPoint3 with radius 400.00, depth 128.00, and a 1.00 second trailing delay
      • Custom script: call RemoveLocation( udg_LocPoint1 )
      • Custom script: call RemoveLocation( udg_LocPoint2 )
      • Custom script: call RemoveLocation( udg_LocPoint3 )
      • Wait 1.00 seconds
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Camera - Stop swaying/shaking the camera for (Picked player)
          • Special Effect - Destroy Spec1
          • Special Effect - Destroy Spec2
Thx for whoever find the problem...
 
Level 7
Joined
Jul 20, 2008
Messages
377
Why are you destroying the temp group repeatedly? You don't have to destroy and recreate the same group or location in a single trigger. You just do that at the end of a trigger.

  • Set TempUnitGroup = (Units within 300.00 of LocPoint3 matching ((((Owner of (Matching unit)) is an ally of (Owner of (Triggering unit))) Equal to False) and (((Matching unit) is An Ancient) Equal to False)))
  • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
  • Loop - Actions
  • Unit - Remove classification of An Ancient from (Picked unit)
Look at that. There's probably your problem. You're forming a group of units that... aren't Ancients. So how can you remove the Ancient classification from an unit that isn't an Ancient?
 
Status
Not open for further replies.
Top