• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Shockwave-like Spell not working

Status
Not open for further replies.
Level 10
Joined
Jun 10, 2007
Messages
557
I'm making a spellpack purely for practice purposes (I know some of the spells have been done before, and probably better), and I've come to one issue that I really can't figure out. Basically you cast the spell on a unit and a visual dummy is created that slowly moves to the target unit's location, creating dummy units who cast damaging spells on nearby enemy units every 0.75 seconds. Whether it's balanced or not doesn't matter, but the spell isn't working properly at all.

When I cast it, the visual dummy (sphere) moves to the target point, then dummies are being created at the target point (but only after the sphere dies) and they cast their spell, but either they are A: being recreated over and over again or B: not dying when they are supposed to. I really can't figure this out... help?

I have two triggers for the spell.

  • Sphere of Thunder
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Sphere of Thunder
    • Actions
      • Custom script: local location udg_TempLoc
      • Set TempLoc = ((Position of (Triggering unit)) offset by 200.00 towards (Facing of (Triggering unit)) degrees)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Sphere of Thunder for (Triggering unit)) Equal to 1
        • Then - Actions
          • Unit - Create 1 SphereofThunder1 for (Owner of (Triggering unit)) at TempLoc facing Default building facing degrees
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Sphere of Thunder for (Triggering unit)) Equal to 2
            • Then - Actions
              • Unit - Create 1 SphereofThunder2 for (Owner of (Triggering unit)) at TempLoc facing Default building facing degrees
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Sphere of Thunder for (Triggering unit)) Equal to 3
                • Then - Actions
                  • Unit - Create 1 SphereofThunder3 for (Owner of (Triggering unit)) at TempLoc facing Default building facing degrees
                • Else - Actions
      • Set TempLoc = ((Position of (Triggering unit)) offset by 800.00 towards (Facing of (Triggering unit)) degrees)
      • Unit - Order (Last created unit) to Move To TempLoc
      • Custom script: call RemoveLocation (udg_TempLoc)
And where I suspect things are going wrong:

  • Sphere of Thunder Bolts
    • Events
      • Time - Every 0.75 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Unit-type of (Matching unit)) Equal to SphereofThunder1) or ((Unit-type of (Matching unit)) Equal to SphereofThunder2)) or ((Unit-type of (Matching unit)) Equal to SphereofThunder3))) and do (Actions)
        • Loop - Actions
          • Set SoTDummy = (Picked unit)
          • Set TempLoc = (Position of SoTDummy)
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units within 300.00 of TempLoc matching (((Matching unit) belongs to an enemy of (Owner of SoTDummy)) Equal to True)) and do (Actions)
            • Loop - Actions
              • Set SoTTarget = (Picked unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of SoTDummy) Equal to SphereofThunder1
                • Then - Actions
                  • Unit - Create 1 SoTDummy 1 for (Owner of SoTDummy) at TempLoc facing Default building facing degrees
                  • Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb SoTTarget
                  • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of SoTDummy) Equal to SphereofThunder2
                    • Then - Actions
                      • Unit - Create 1 SoTDummy 2 for (Owner of SoTDummy) at TempLoc facing Default building facing degrees
                      • Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb SoTTarget
                      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of SoTDummy) Equal to SphereofThunder3
                        • Then - Actions
                          • Unit - Create 1 SoTDummy 3 for (Owner of SoTDummy) at TempLoc facing Default building facing degrees
                          • Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb SoTTarget
                          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
                        • Else - Actions
Upon writing this I realize why the dummies are being recreated over and over but not how to fix it... I am totally clueless here. :bored:
 
Level 7
Joined
Sep 5, 2006
Messages
333
What did you base your spell on? I think I can help you fix this one. First, the 2nd trigger of yours can be replace by Barrage or Phoenix Fire if you want only damage but if you want other effect like slow, you have to trigger it.
 
Level 10
Joined
Jun 10, 2007
Messages
557
Frost Nova, probably should have been just a spell that could target an area like Shockwave though.

Also: I didn't think of Pheonix Fire, trying that out now.

EDIT: Tried out Pheonix Fire, thanks for the idea. :grin: Although is there a way for it to target multiple enemies at once or does it have to target individual ones every X seconds?
 
Level 10
Joined
Jun 10, 2007
Messages
557
Well, it seems to pick a new target every time, which I suppose is alright but not quite was I was expecting out of it. Making the cooldown to 0.01 just made it kill thing instantly. And Barrage only works when you attack something and this gets finicky with moving units... oh well, thank you anyway.
 
Status
Not open for further replies.
Top