Tried to make a triggered AoE slow but it's not working - what am I doing wrong/why is it not working properly

Status
Not open for further replies.
Level 3
Joined
Jul 3, 2013
Messages
25
So I made a spell based on Fan of Knives (I like the animation) and added a trigger (see below) 'cuz I wanted to throw an AoE slow on top of it.

Problem is, the slow seems to only activate on one enemy each time I cast the ability instead of all nearby enemies, and I'm not sure where the issue lies. Is it a problem with Fan of Knives specifically that I'm unaware about? I know it's not a pick range issue since doubling the range still made the slow affect only 1 target

Important, maybe: I'm using World Editor version 1.24d (yeah this thing is ancient)

Checklist:
  • Made sure that my dummy's Cast Backswing and Cast Animations were 0
  • Added Invulnerable (Neutral) and Locust to the Dummy
  • Model File is Zone Indicator (Custom Campaign)
  • Attacks Enabled: None
  • Movement Type: Fly
  • Collision Size: 0.01
  • Dummy Spell (based on Human Sorceress' Slow) has no cooldown, no mana cost, no casting time, and has a big cast range
  • Dummy unit has a decent vision radius so it shouldn't lose sight of nearby enemies
  • Made sure that the enemies I'm testing the spell on are alive, aren't magic immune/structures/allied

  • Stone Edge Level 3 Trigger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Stone Edge
      • (Level of Stone Edge for (Casting unit)) Equal to 3
    • Actions
      • Set StoneEdgeCaster = (Triggering unit)
      • Set StoneEdgeOwner = (Owner of StoneEdgeCaster)
      • Set StoneEdgePoint = (Position of StoneEdgeCaster)
      • Unit - Create 1 Stone Edge Dummy for StoneEdgeOwner at StoneEdgePoint facing Default building facing degrees
      • Set StoneEdgeDummy = (Last created unit)
      • Unit - Add StoneEdgeSlow Level 3 to StoneEdgeDummy
      • Unit - Add a 2.00 second Generic expiration timer to StoneEdgeDummy
      • Set StoneEdgePick = (Units within 375.00 of StoneEdgePoint)
      • Unit Group - Pick every unit in StoneEdgePick and do (Actions)
        • Loop - Actions
          • Set StoneEdgeTemp = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (StoneEdgeTemp is Magic Immune) Equal to False
              • (StoneEdgeTemp is A structure) Equal to False
              • (StoneEdgeTemp belongs to an enemy of StoneEdgeOwner) Equal to True
              • (StoneEdgeTemp is alive) Equal to True
            • Then - Actions
              • Unit - Order StoneEdgeDummy to Human Sorceress - Slow StoneEdgeTemp
            • Else - Actions
      • Custom script: call RemoveLocation(udg_StoneEdgePoint)
      • Custom script: call DestroyGroup(udg_StoneEdgePick)
Is there something I missed somewhere?

I'd rather not base the dummy slow on Thunder Clap because of the ground deformation, for what it's worth, but if I have no choice I can switch to that instead
 

Uncle

Warcraft Moderator
Level 69
Joined
Aug 10, 2018
Messages
7,189
First confirm that you can cast the Slow ability by adding it to your Hero and testing it from there.

Next, make sure that your Dummy unit has the correct settings:

Base it on the Crypt Lord's Locust and modify the following:
Model: None,
Shadow: None,
Attacks Enabled: None,
Movement Type: None,
Speed Base: 0.

The Movement stuff is what's most important to get your Dummy unit casting spells immediately. With these settings your Dummy unit can have an expiration timer of 0.01 seconds without any issues.

Also, I recommend ordering the Conditions in your If Then Else to happen in order from most common to least common. So that would likely be:
  • (StoneEdgeTemp belongs to an enemy of StoneEdgeOwner) Equal to True
  • (StoneEdgeTemp is alive) Equal to True
  • (StoneEdgeTemp is A structure) Equal to False
  • (StoneEdgeTemp is Magic Immune) Equal to False
This is because the function which checks the Conditions will return on the first failed condition, so putting the most common failure first is a nice optimization. In other words, if the unit doesn't belong to an enemy player then it never has to check if it's alive/a structure/magic immune.

Also, Text Messages are a great debugging tool, you can add them throughout the trigger to get a visual indicator of what's happening when you test the map. For example, displaying the name of StoneEdgeTemp can help confirm which units are actually being picked in the Unit Group - if any.

Finally, update your damn Warcraft 3 :p There's a fairly stable 1.31 version if you don't want to deal with Reforged but still have access to newer stuff. You can even go back to 1.29 or something, 1.24 seems WAY unnecessary but maybe you have your reasons.
 
Last edited:
Level 3
Joined
Jul 3, 2013
Messages
25
Speed Base: 0.

The Movement stuff is what's most important to get your Dummy unit casting spells immediately. With these settings your Dummy unit can have an expiration timer of 0.01 seconds without any issues.
Oh my god, this was the problem. I can't believe I missed it 🤦‍♂️

Maybe next time I won't copy-paste an older dummy unit just because I was too lazy to modify it oops - that one has to move to follow its target to cast a delayed spell lol

Also, I recommend ordering the Conditions in your If Then Else to happen in order from most common to least common. So that would likely be:
  • (StoneEdgeTemp belongs to an enemy of StoneEdgeOwner) Equal to True
  • (StoneEdgeTemp is alive) Equal to True
  • (StoneEdgeTemp is A structure) Equal to False
  • (StoneEdgeTemp is Magic Immune) Equal to False
This is because the function which checks the Conditions will return on the first failed condition, so putting the most common failure first is a nice optimization. In other words, if the unit doesn't belong to an enemy player then it never has to check if it's alive/a structure/magic immune.
Good idea, I'll fix it up

Also, Text Messages are a great debugging tool, you can add them throughout the trigger to get a visual indicator of what's happening when you test the map. For example, displaying the name of StoneEdgeTemp can help confirm which units are actually being picked in the Unit Group - if any.
I do this sometimes but as we know by now, the text msg would probably only appear on the 1 target it slows because the cast gets interrupted by the movement command

Finally, update your damn Warcraft 3 :p There's a fairly stable 1.31 version if you don't want to deal with Reforged but still have access to newer stuff. You can even go back to 1.29 or something, 1.24 seems WAY unnecessary but maybe you have your reasons.
When I originally got WC3, I may or may not have received a legal version of it ... is the primary reason :p



Thanks for the help uncle, as long as you don't throw a "one more thing" my way :grin:
 
Level 27
Joined
Nov 25, 2021
Messages
483
Additionally, you can also order the Dummy to cast custom ability based on Silence, which has its Attacks Prevented set to None, and the Movement Speed/Attack Speed reduction and Buff accordingly, to imitate Slow. That way, you don't have to do the (Pick every unit in the region) very often, which can reduce lag if the map has a ton of units.

Thunder Clap/Slam is also a choice, but no one wants to deal with the terrain deformation.
 
Level 3
Joined
Jul 3, 2013
Messages
25
Additionally, you can also order the Dummy to cast custom ability based on Silence, which has its Attacks Prevented set to None, and the Movement Speed/Attack Speed reduction and Buff accordingly, to imitate Slow. That way, you don't have to do the (Pick every unit in the region) very often, which can reduce lag if the map has a ton of units.

Thunder Clap/Slam is also a choice, but no one wants to deal with the terrain deformation.
I forgot Silence had a slow effect! Like, I've indeed used it in the past to replicate Thunder Clap without terrain deformation! 😂 I gotta start remembering these things
 
Level 2
Joined
Jan 1, 2022
Messages
5
1694630874552.png


I change a little few bro you can see i put all the Booleans in one inside "StoneEdgePick" you can check all the booleans are inside :D
You are good bro need to put The unit for all the picking units that you want to make the slow ability.
 

Attachments

  • System_Blank2.w3x
    2.3 MB · Views: 0
Last edited:

Uncle

Warcraft Moderator
Level 69
Joined
Aug 10, 2018
Messages
7,189
Stone Edge Level 3 Trigger
  • joinminus.gif
    events.gif
    Events
    • line.gif
      joinbottom.gif
      unit.gif
      Unit - A unit Starts the effect of an ability
  • joinminus.gif
    cond.gif
    Conditions
    • line.gif
      join.gif
      if.gif
      (Ability being cast) Equal to Stone Edge
    • line.gif
      joinbottom.gif
      if.gif
      (Level of Stone Edge for (Casting unit)) Equal to 3
  • joinbottomminus.gif
    actions.gif
    Actions
    • empty.gif
      join.gif
      set.gif
      Set StoneEdgeCaster = (Triggering unit)
    • empty.gif
      join.gif
      set.gif
      Set StoneEdgeOwner = (Owner of StoneEdgeCaster)
    • empty.gif
      join.gif
      set.gif
      Set StoneEdgePoint = (Position of StoneEdgeCaster)
    • empty.gif
      join.gif
      set.gif
      Set StoneEdgeDummy = (Last created unit)
    • empty.gif
      join.gif
      set.gif
      Set StoneEdgePick = (Units within 375.00 of StoneEdgePoint)
    • empty.gif
      joinminus.gif
      unitgroup.gif
      Unit Group - Pick every unit in StoneEdgePick and do (Actions)
      • empty.gif
        line.gif
        joinbottomminus.gif
        actions.gif
        Loop - Actions
        • empty.gif
          line.gif
          empty.gif
          join.gif
          set.gif
          Set StoneEdgeTemp = (Picked unit)
        • empty.gif
          line.gif
          empty.gif
          joinbottomminus.gif
          if.gif
          If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • empty.gif
            line.gif
            empty.gif
            empty.gif
            joinminus.gif
            cond.gif
            If - Conditions
            • empty.gif
              line.gif
              empty.gif
              empty.gif
              line.gif
              join.gif
              if.gif
              (StoneEdgeTemp is Magic Immune) Equal to False
            • empty.gif
              line.gif
              empty.gif
              empty.gif
              line.gif
              join.gif
              if.gif
              (StoneEdgeTemp is A structure) Equal to False
            • empty.gif
              line.gif
              empty.gif
              empty.gif
              line.gif
              join.gif
              if.gif
              (StoneEdgeTemp belongs to an enemy of StoneEdgeCaster) Equal to True
            • empty.gif
              line.gif
              empty.gif
              empty.gif
              line.gif
              joinbottom.gif
              if.gif
              (StoneEdgeTemp is alive) Equal to True
          • empty.gif
            line.gif
            empty.gif
            empty.gif
            joinminus.gif
            actions.gif
            Then - Actions
            • empty.gif
              join.gif
              unit.gif
              Unit - Create 1 Stone Edge Dummy for StoneEdgeOwner at StoneEdgePoint facing Default building facing degrees
            • unit.gif
              Unit - Add StoneEdgeSlow Level 3 to Lass created unit
            • unit.gif
              Unit - Add a 2.00 second Generic expiration timer to Last created unit
            • unit.gif
              Unit Order Last created unit to Human Sorceress - Slow Picked unit
          • empty.gif
            line.gif
            empty.gif
            empty.gif
            joinbottom.gif
            actions.gif
            Else - Actions
    • empty.gif
      join.gif
      page.gif
      Custom script: call RemoveLocation(udg_StoneEdgePoint)
    • empty.gif
      joinbottom.gif
      page.gif
      Custom script: call DestroyGroup(udg_StoneEdgePick)
That's just an objectively worse trigger. You only need 1 Dummy unit, not one per unit in the Unit Group. Remember that the Loop - Actions occur once for EACH unit inside of the Unit Group.

Also, see this in case you didn't already know:

Silence could work nicely but note that it's Area of Effect won't quite matchup with this:
  • Set StoneEdgePick = (Units within 375.00 of StoneEdgePoint)
Triggered AoE is not the same as Ability AoE because abilities take into consideration collision size. It's not the end of the world but if you want that perfect 100% consistency then it might be something to take into consideration.
 
Last edited:
Level 3
Joined
Jul 3, 2013
Messages
25
Silence could work nicely but note that it's Area of Effect won't quite matchup with this:
  • Set StoneEdgePick = (Units within 375.00 of StoneEdgePoint)
Triggered AoE is not the same as Ability AoE because abilities take into consideration collision size. It's not the end of the world but if you want that perfect 100% consistency then it might be something to take into consideration.
Oh yes I'm aware - I actually changed the triggered AoE (375->378) to reflect the base spell's range, since by default I have most if not all units at 0.01 collision size. I think 0.03 should just about cover it and likely won't cause any issues
 
Status
Not open for further replies.
Top