[Spell] Loop Interval (Withering Fire)

Level 5
Joined
Feb 22, 2025
Messages
78
Hi yall so,

I'm trying to create a spell that triggers whenever a unit notices a target. Basically, the spell is supposed to be Withering fire from HOTS.
-I created a Point variable- Random point in region centered at position of the caster with size 4x4
-Withering fire dummy Array 5
-Withering fire group Units within 800 of position of the Caster matching xzyblah every 0.01 secs

* Posting the triggers and the in-game effect( don't judge pelase xd)
----------------------------------------------------------------------------------------------------------------------
  • WithFireGroup
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set VariableSet WithFire_Group = (Units within 800.00 of (Position of Sylvanas 0020 <gen>) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of Sylvanas 0020 <gen>).) Equal to True)
  • RandomPoint
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set VariableSet WithFire_Point = (Random point in (Region centered at (Position of Sylvanas 0020 <gen>) with size (4.00, 4.00)))
  • WithFireDmg
    • Events
      • Unit - Sylvanas 0020 <gen> Notices a target in range
    • Conditions
      • (Sylvanas 0020 <gen> is alive) Equal to True
      • ((This trigger) is on) Equal to True
      • (WithFire_Group is empty) Equal to False
    • Actions
      • Trigger - Turn off (This trigger)
      • Special Effect - Create a special effect attached to the origin of WithFire_Caster using Abilities\Spells\NightElf\shadowstrike\ShadowStrikeMissile.mdl
      • Set VariableSet WithFire_Caster = (Triggering unit)
      • Special Effect - Destroy (Last created special effect)
      • Unit Group - Pick every unit in WithFire_Group and do (Actions)
        • Loop - Actions
          • For each (Integer A) from 1 to 5, do (Actions)
            • Loop - Actions
              • Unit - Create 1 Withering Fire for (Owner of (Triggering unit)) at WithFire_Point facing (Position of (Random unit from WithFire_Group))
              • Set VariableSet WithFire[(Integer A)] = (Last created unit)
              • Special Effect - Create a special effect attached to the chest of WithFire[(Integer A)] using Abilities\Spells\NightElf\shadowstrike\ShadowStrikeMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • For each (Integer A) from 1 to 5, do (Actions)
                • Loop - Actions
                  • Unit - Add Firebolt (Neutral Hostile) to WithFire[(Integer A)]
                  • Unit - Order WithFire[(Integer A)] to Neutral - Firebolt (Random unit from WithFire_Group)
              • For each (Integer A) from 1 to 5, do (Actions)
                • Loop - Actions
                  • Unit - Add a 0.60 second Generic expiration timer to WithFire[(Integer A)]
      • Wait 0.60 seconds
      • Custom script: call DestroyGroup(udg_WithFire_Group)
      • Trigger - Turn on (This trigger)
  • WithFireremove
    • Events
      • Unit - A unit Dies
    • Conditions
      • (WithFire[(Integer A)] is dead) Equal to True
    • Actions
      • Set VariableSet WithFire_dummydied = (Triggering unit)
      • Unit - Remove (Triggering unit) from the game
----------------------------------------------------------------------------------
Since I'm kinda new to coding and I'm postponing learning Jass :") I need help with a few things:
1. How can I make dummies spawn at an interval in the loop cuz they (all 5 of them) spawn at the same time at the same point. Basically, I want them to spawn in a 0.6 s interval at random points around the caster in the variable I've set recently so it would be pleasing to the eye - cuz their experation timer is 0.6 seconds.
2. Can someone check this for leakage also :")
 
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Currently you create 5 Dummy units per Enemy unit in the group. So if there's 5 Footman, you'll Create 25 Dummy units and cast 25 Firebolts. Is this intended?

Please explain in detail what you want, because Withering Fire's description is "Shoots the closest unit up to five times".
 
Level 5
Joined
Feb 22, 2025
Messages
78
Currently you create 5 Dummy units per Enemy unit in the group. So if there's 5 Footman, you'll Create 25 Dummy units and cast 25 Firebolts. Is this intended?

Please explain in detail what you want, because Withering Fire's description is "Shoots the closest unit up to five times".
Ty for the quick reply! That was not intended xx... I wanted to create up to 5 clones that will firebolt closest unit in range of Sylv in a way that each clone would spawn as the previous one gets removed, that is to set the interval i guess to 0.6s. But I want the clones to spawn in different positions around Sylv, cuz they spawn at the same point instantly all x of them...
 
Level 5
Joined
Feb 22, 2025
Messages
78
Ty for the quick reply! That was not intended xx... I wanted to create up to 5 clones that will firebolt closest unit in range of Sylv in a way that each clone would spawn as the previous one gets removed, that is to set the interval i guess to 0.6s. But I want the clones to spawn in different positions around Sylv, cuz they spawn at the same point instantly all x of them...
My original idea was to create 1-5 clones depending of the enem units in the range that would firebolt those 1-5 units, but I guess shooting the closest target is way better. Eather way I don't know how to make that happen :')
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
My original idea was to create 1-5 clones depending of the enem units in the range that would firebolt those 1-5 units, but I guess shooting the closest target is way better. Eather way I don't know how to make that happen :')
I can show you how to do either, but it'd be easier if you settled on one way -> Random from a group or always the closest unit.

Anyway, as far as I understand you want it so that:

1) Sylvanas attacks a unit.
2) A clone spawns on her and shoots the closest (or random) target.
3) Wait 0.60 seconds.
4) A clone spawns on her again (even if she moved during this time) and shoots the closest target.
5) Repeat steps #3 and #4 until all 5 shots are fired.
 
Last edited:
Level 5
Joined
Feb 22, 2025
Messages
78
I can show you how to do either, but it'd be easier if you settled on one way -> Random from a group or always the closest unit.

Anyway, far as I understand you want it so that:

1) Sylvanas attacks a unit.
2) A clone spawns on her and shoots the closest (or random) target.
3) Wait 0.60 seconds.
4) A clone spawns on her again (even if she moved during this time) and shoots the closest target.
5) Repeat steps #3 and #4 until all 5 shots are fired.
Let's go with the closest unit, yes that's it, ty!
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Let's go with the closest unit, yes that's it, ty!
I actually started making it using Random units and am now being lazy and don't want to change it... lol.

Here's a working example of the ability with random targets. I'll show you how to do the "closest target" in the near future, if you're still interested.
 

Attachments

  • Withering Fire 1.w3m
    28 KB · Views: 3
Level 5
Joined
Feb 22, 2025
Messages
78
I actually got started using Random units and I am now being lazy and don't want to change it... lol.

Here's a working example of the ability with random targets. I'll show you how to do the "closest target" in the near future, if you're still interested.
Ty! Don't rush this will do :ogre_datass:
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Ty! Don't rush this will do :ogre_datass:
No problem, and to provide some answers:
1) You were leaking a Point and a Unit Group every 0.03 seconds in your WithFireGroup trigger. (Position of ...)
2) You were leaking 2 Points every 0.01 seconds in your RandomPoint trigger. I believe the Region leaked as well.
3) Your WithFireremove didn't really make any sense. Just check for the Unit-Type in the future and Remove it if it's a "Withering Dummy".
4) Your For Loops within the first For Loop were unnecessary and problematic. You could do everything in the first For Loop while looping from 1 to 5. If you ever actually need "nested" For Loops make sure that each of them uses a different Integer (sharing Integer A is a big problem and makes them interfere with one another).

Obviously these issues don't exist in the map I sent you.

Also, here's a link to the Unit Indexer system which is what enables all of my triggers to work:
GUI Unit Indexer 1.4.0.0
Long story short, it automatically assigns each unit a unique Custom Value as they come into play. This can then be used to effectively "attach Variables" to units. This "attaching" is done by using the unit's custom value as the [index] of any Variable array. You can see me doing this in order to link the Dummy unit to it's Caster (Dark Ranger) as well as to track the Missile Interval and Missile Count variables individually for each Dummy unit.

Thanks to this design you can have any number of Dark Rangers running around using this ability without issues.
 
Last edited:
Level 5
Joined
Feb 22, 2025
Messages
78
No problem, and to provide some answers:
1) You were leaking a Point and a Unit Group every 0.03 seconds in your WithFireGroup trigger.
2) You were leaking 2 Points every 0.01 seconds in your RandomPoint trigger. I believe the Region leaked as well.
3) Your WithFireremove didn't really make any sense. Just check for the Unit-Type in the future and Remove it if it's a "Withering Dummy".
4) Your For Loops within the first For Loop were unnecessary and problematic. You could do everything in the first For Loop from 1 to 5. If you ever actually need "nested" For Loops make sure that each of them uses a different Integer (sharing Integer A is a big problem and makes them interfere with one another).

Obviously these issues don't exist in the map I sent you. Also, here's a link to the Unit Indexer system which is what enables all of my triggers to work:
GUI Unit Indexer 1.4.0.0
Long story short, it automatically assigns each unit a unique Custom Value as they come into play, which can then be used to effectively "attach Variables" to units. This "attaching" is done by using the unit's custom value as the [index] of your Variable array. You can see me doing this in order to link the Dummy to it's Caster (Dark Ranger) as well as track the Missile Interval and Missile Count variables for each Dummy unit.

Thanks to this design you can have any number of Dark Rangers running around using this ability without issues.
Noted!
 
Level 5
Joined
Feb 22, 2025
Messages
78
No problem, and to provide some answers:
1) You were leaking a Point and a Unit Group every 0.03 seconds in your WithFireGroup trigger. (Position of ...)
2) You were leaking 2 Points every 0.01 seconds in your RandomPoint trigger. I believe the Region leaked as well.
3) Your WithFireremove didn't really make any sense. Just check for the Unit-Type in the future and Remove it if it's a "Withering Dummy".
4) Your For Loops within the first For Loop were unnecessary and problematic. You could do everything in the first For Loop while looping from 1 to 5. If you ever actually need "nested" For Loops make sure that each of them uses a different Integer (sharing Integer A is a big problem and makes them interfere with one another).

Obviously these issues don't exist in the map I sent you.

Also, here's a link to the Unit Indexer system which is what enables all of my triggers to work:
GUI Unit Indexer 1.4.0.0
Long story short, it automatically assigns each unit a unique Custom Value as they come into play. This can then be used to effectively "attach Variables" to units. This "attaching" is done by using the unit's custom value as the [index] of any Variable array. You can see me doing this in order to link the Dummy unit to it's Caster (Dark Ranger) as well as to track the Missile Interval and Missile Count variables individually for each Dummy unit.

Thanks to this design you can have any number of Dark Rangers running around using this ability without issues.
Sorry to bother again, I don't have the latest version of WE and I can't open the map, I extracted it's triggers but it's giving me compile error in Jass and I have 0 knowledge about Jass lol, is there a posibility to post triggers, also I already have GUI Unit Indexer implemented, since I'm using numerous spells that I'm currently modifiying in my developing map. If u wish I can post the map since idk what's causing the error, tnx in forward! :)
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Sorry to bother again, I don't have the latest version of WE and I can't open the map, I extracted it's triggers but it's giving me compile error in Jass and I have 0 knowledge about Jass lol, is there a posibility to post triggers, also I already have GUI Unit Indexer implemented, since I'm using numerous spells that I'm currently modifiying in my developing map. If u wish I can post the map since idk what's causing the error, tnx in forward! :)
You should try reading the error message that comes up. You don't need to understand Jass to get an idea of what it's conveying, it's referencing your triggers and it offers an explanation in plain old english. You may read something like "Bad name" which means you probably misspelled something. Everything is case sensitive and has to be exact, so your Custom Script cannot be any different from mine. Also, make sure you have JassHelper enabled, but I assume that's already the case.
 
Level 5
Joined
Feb 22, 2025
Messages
78
You should try reading the error that comes up. You don't need to understand Jass to get an idea of what the error is conveying, it's referencing your triggers and it may even tell you "Bad name" or something, which means you probably misspelled something. Everything is case sensitive and has to be exact, your Custom Script cannot be any different from mine. Also, make sure you have JassHelper enabled.
There it is
 

Attachments

  • Jasserr.JPG
    Jasserr.JPG
    99.8 KB · Views: 8

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
There it is
Did you import a second Unit Indexer? Redeclared means you have two functions with the same name (I think). Also, what's that other error show?

Again, make sure your Variables + Custom Script matches mine exactly. If you renamed a variable it'll definitely throw errors unless you also updated it in all of the Custom Scripts that referenced said variables.
 
Level 5
Joined
Feb 22, 2025
Messages
78
Did you import a second Unit Indexer? Redeclared means you have two functions with the same name (I think). Also, what's that other error show?

Again, make sure your Variables + Custom Script matches mine exactly. If you renamed a variable it'll definitely throw errors unless you also updated it in all of the Custom Scripts that referenced said variables.
This is the second error, Yup imported the linked one, I'm not sure of the variables, I have a sh*t tone of them :cry:
 

Attachments

  • jasserror 2.JPG
    jasserror 2.JPG
    74.1 KB · Views: 5
Level 5
Joined
Feb 22, 2025
Messages
78
Did you import a second Unit Indexer? Redeclared means you have two functions with the same name (I think). Also, what's that other error show?

Again, make sure your Variables + Custom Script matches mine exactly. If you renamed a variable it'll definitely throw errors unless you also updated it in all of the Custom Scripts that referenced said variables.
Also if i import the linked indexer it marks the trigger as a copy and gives error when I try to validate, I guess cuz I already have indexer idk?
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
You definitely don't want two of the same system. All Unit Indexer's do the same thing anyway, a map only needs one.

Anyway, did this error start after creating my triggers? Also, please post your triggers if possible. Again, you probably just messed up the Custom Script.
 
Level 5
Joined
Feb 22, 2025
Messages
78
You definitely don't want two of the same system. All Unit Indexer's do the same thing anyway, a map only needs one.

Anyway, did this error start after creating my triggers? Also, please post your triggers if possible. Again, you probably just messed up the Custom Script.
I guess I messed something up :") , at this point I can just send u everything :") Again sorry if it's bothering u... I should deffo get into Jass learning... Ty!
*The error showed up when the custom script was implemented
 

Attachments

  • 2.19.2025 FW bckup12.w3m
    21.1 MB · Views: 3
  • 2.19.2025 FW bckup12.wtg
    292.4 KB · Views: 2
Level 5
Joined
Feb 22, 2025
Messages
78
I copy and pasted my triggers into your map and it works fine.
View attachment 515435
Make sure you have JassHelper enabled:
View attachment 515436
Also, I recommend putting all of your Jass systems at the top of the Trigger hiearchy.
I was trying to paste the custom script from the mpq extracted war3map.j file into a custom script since I can't open newer versions of the map ... Is there a way for me to access those triggers so I can see what's going on :")
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
  • Withering Fire Proc
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Dark Ranger
      • Withering_Fire_On_Cooldown[(Custom value of (Attacking unit))] Equal to False
    • Actions
      • Custom script: local integer cv = GetUnitUserData( GetAttacker() )
      • Custom script: set udg_Withering_Fire_On_Cooldown[cv] = true
      • -------- --------
      • Set VariableSet Withering_Fire_Caster[0] = (Attacking unit)
      • -------- --------
      • -------- Setup the Dummy unit (1 per cast): --------
      • Set VariableSet Withering_Fire_Point[0] = (Position of Withering_Fire_Caster[0])
      • Unit - Create 1 Withering Fire Dummy for (Owner of Withering_Fire_Caster[0]) at Withering_Fire_Point[0] facing Default building facing degrees
      • Set VariableSet Withering_Fire_Dummy = (Last created unit)
      • Set VariableSet Withering_Fire_CV = (Custom value of Withering_Fire_Dummy)
      • Set VariableSet Withering_Fire_Caster[Withering_Fire_CV] = Withering_Fire_Caster[0]
      • -------- --------
      • -------- Help make the attack animation of the Dummy keep up with the rapid fire casts: --------
      • Animation - Change Withering_Fire_Dummy's animation speed to 480.00% of its original speed
      • -------- --------
      • -------- This is a "just in case" expiration timer that should never finish: --------
      • Unit - Add a 8.00 second Generic expiration timer to Withering_Fire_Dummy
      • -------- --------
      • -------- =========================================================================== --------
      • -------- DEFINE THE MISSILE INTERVAL AND NUMBER OF MISSILES FIRED: --------
      • Set VariableSet Withering_Fire_Interval[Withering_Fire_CV] = 0.30
      • Set VariableSet Withering_Fire_Missile_Count[Withering_Fire_CV] = 5
      • -------- =========================================================================== --------
      • -------- --------
      • -------- Get nearby enemy units: --------
      • Set VariableSet Withering_Fire_Target_Group[Withering_Fire_CV] = (Units within 800.00 of Withering_Fire_Point[0].)
      • Unit Group - Pick every unit in Withering_Fire_Target_Group[Withering_Fire_CV] and do (Actions)
        • Loop - Actions
          • Set VariableSet Withering_Fire_Target = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Withering_Fire_Target belongs to an enemy of (Owner of Withering_Fire_Caster[0]).) Equal to True
              • (Withering_Fire_Target is alive) Equal to True
              • (Withering_Fire_Target is A structure) Equal to False
            • Then - Actions
              • -------- It's a valid target --------
            • Else - Actions
              • -------- It's an illegal target --------
              • Unit Group - Remove Withering_Fire_Target from Withering_Fire_Target_Group[Withering_Fire_CV].
      • Custom script: call RemoveLocation( udg_Withering_Fire_Point[0] )
      • -------- --------
      • -------- Track the Dummy so we can use it in the Loop trigger: --------
      • Unit Group - Add Withering_Fire_Dummy to Withering_Fire_Dummy_Group
      • Trigger - Turn on Withering Fire Loop <gen>
      • -------- --------
      • -------- Launch a missile immediately (OPTIONAL): --------
      • Trigger - Run Withering Fire Launch Missile <gen> (ignoring conditions)
      • -------- --------
      • -------- Manage the cooldown for this effect: --------
      • Wait 0.60 game-time seconds
      • Custom script: set udg_Withering_Fire_On_Cooldown[cv] = false
  • Withering Fire Launch Missile
    • Events
    • Conditions
    • Actions
      • -------- Subtract from the missile count: --------
      • Set VariableSet Withering_Fire_Missile_Count[Withering_Fire_CV] = (Withering_Fire_Missile_Count[Withering_Fire_CV] - 1)
      • -------- --------
      • -------- Try to get a living target from the group: --------
      • Set VariableSet Withering_Fire_Target = (Random unit from Withering_Fire_Target_Group[Withering_Fire_CV])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Withering_Fire_Target is alive) Equal to False
        • Then - Actions
          • -------- We found a dead target, let's clean up any dead units from the group: --------
          • Set VariableSet Withering_Fire_Target = No unit
          • Unit Group - Pick every unit in Withering_Fire_Target_Group[Withering_Fire_CV] and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is alive) Equal to True
                • Then - Actions
                  • -------- It's a valid target --------
                  • Set VariableSet Withering_Fire_Target = (Picked unit)
                • Else - Actions
                  • -------- It's an illegal target --------
                  • Unit Group - Remove (Picked unit) from Withering_Fire_Target_Group[Withering_Fire_CV].
        • Else - Actions
      • -------- --------
      • -------- Either end now or launch a missile: --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • Withering_Fire_Missile_Count[Withering_Fire_CV] Equal to 0
              • Withering_Fire_Target Equal to No unit
        • Then - Actions
          • -------- End now if the group is empty or we ran out of missiles! --------
          • Unit Group - Remove Withering_Fire_Dummy from Withering_Fire_Dummy_Group.
          • Unit - Remove Withering_Fire_Dummy from the game
          • -------- --------
          • -------- Turn off the loop while there is no active Dummy: --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Withering_Fire_Dummy_Group is empty) Equal to True
            • Then - Actions
              • Trigger - Turn off Withering Fire Loop <gen>
            • Else - Actions
        • Else - Actions
          • -------- We found a valid target, launch a missile! --------
          • Set VariableSet Withering_Fire_Point[0] = (Position of Withering_Fire_Caster[Withering_Fire_CV])
          • Set VariableSet Withering_Fire_Point[1] = (Position of Withering_Fire_Target)
          • Set VariableSet Withering_Fire_Point[2] = (Withering_Fire_Point[0] offset by 8.00 towards (Random angle) degrees.)
          • -------- --------
          • Unit - Move Withering_Fire_Dummy instantly to Withering_Fire_Point[2]
          • Unit - Make Withering_Fire_Dummy face (Angle from Withering_Fire_Point[0] to Withering_Fire_Point[1])
          • Unit - Order Withering_Fire_Dummy to Neutral - Firebolt Withering_Fire_Target
          • Special Effect - Create a special effect attached to the chest of Withering_Fire_Dummy using Abilities\Spells\NightElf\shadowstrike\ShadowStrikeMissile.mdl
          • Special Effect - Destroy (Last created special effect)
          • -------- --------
          • Custom script: call RemoveLocation( udg_Withering_Fire_Point[0] )
          • Custom script: call RemoveLocation( udg_Withering_Fire_Point[1] )
          • Custom script: call RemoveLocation( udg_Withering_Fire_Point[2] )
  • Withering Fire Loop
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Withering_Fire_Dummy_Group and do (Actions)
        • Loop - Actions
          • Set VariableSet Withering_Fire_Dummy = (Picked unit)
          • Set VariableSet Withering_Fire_CV = (Custom value of Withering_Fire_Dummy)
          • -------- --------
          • -------- Track how much time has passed: --------
          • Set VariableSet Withering_Fire_Interval[Withering_Fire_CV] = (Withering_Fire_Interval[Withering_Fire_CV] - 0.05)
          • -------- --------
          • -------- Launch a missile every interval: --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Withering_Fire_Interval[Withering_Fire_CV] Less than or equal to 0.01
            • Then - Actions
              • Set VariableSet Withering_Fire_Interval[Withering_Fire_CV] = 0.30
              • Trigger - Run Withering Fire Launch Missile <gen> (ignoring conditions)
            • Else - Actions
 

Attachments

  • a.png
    a.png
    123.6 KB · Views: 2
  • b.png
    b.png
    49 KB · Views: 2
Level 5
Joined
Feb 22, 2025
Messages
78
  • Withering Fire Proc
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Dark Ranger
      • Withering_Fire_On_Cooldown[(Custom value of (Attacking unit))] Equal to False
    • Actions
      • Custom script: local integer cv = GetUnitUserData( GetAttacker() )
      • Custom script: set udg_Withering_Fire_On_Cooldown[cv] = true
      • -------- --------
      • Set VariableSet Withering_Fire_Caster[0] = (Attacking unit)
      • -------- --------
      • -------- Setup the Dummy unit (1 per cast): --------
      • Set VariableSet Withering_Fire_Point[0] = (Position of Withering_Fire_Caster[0])
      • Unit - Create 1 Withering Fire Dummy for (Owner of Withering_Fire_Caster[0]) at Withering_Fire_Point[0] facing Default building facing degrees
      • Set VariableSet Withering_Fire_Dummy = (Last created unit)
      • Set VariableSet Withering_Fire_CV = (Custom value of Withering_Fire_Dummy)
      • Set VariableSet Withering_Fire_Caster[Withering_Fire_CV] = Withering_Fire_Caster[0]
      • -------- --------
      • -------- Help make the attack animation of the Dummy keep up with the rapid fire casts: --------
      • Animation - Change Withering_Fire_Dummy's animation speed to 480.00% of its original speed
      • -------- --------
      • -------- This is a "just in case" expiration timer that should never finish: --------
      • Unit - Add a 8.00 second Generic expiration timer to Withering_Fire_Dummy
      • -------- --------
      • -------- =========================================================================== --------
      • -------- DEFINE THE MISSILE INTERVAL AND NUMBER OF MISSILES FIRED: --------
      • Set VariableSet Withering_Fire_Interval[Withering_Fire_CV] = 0.30
      • Set VariableSet Withering_Fire_Missile_Count[Withering_Fire_CV] = 5
      • -------- =========================================================================== --------
      • -------- --------
      • -------- Get nearby enemy units: --------
      • Set VariableSet Withering_Fire_Target_Group[Withering_Fire_CV] = (Units within 800.00 of Withering_Fire_Point[0].)
      • Unit Group - Pick every unit in Withering_Fire_Target_Group[Withering_Fire_CV] and do (Actions)
        • Loop - Actions
          • Set VariableSet Withering_Fire_Target = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Withering_Fire_Target belongs to an enemy of (Owner of Withering_Fire_Caster[0]).) Equal to True
              • (Withering_Fire_Target is alive) Equal to True
              • (Withering_Fire_Target is A structure) Equal to False
            • Then - Actions
              • -------- It's a valid target --------
            • Else - Actions
              • -------- It's an illegal target --------
              • Unit Group - Remove Withering_Fire_Target from Withering_Fire_Target_Group[Withering_Fire_CV].
      • Custom script: call RemoveLocation( udg_Withering_Fire_Point[0] )
      • -------- --------
      • -------- Track the Dummy so we can use it in the Loop trigger: --------
      • Unit Group - Add Withering_Fire_Dummy to Withering_Fire_Dummy_Group
      • Trigger - Turn on Withering Fire Loop <gen>
      • -------- --------
      • -------- Launch a missile immediately (OPTIONAL): --------
      • Trigger - Run Withering Fire Launch Missile <gen> (ignoring conditions)
      • -------- --------
      • -------- Manage the cooldown for this effect: --------
      • Wait 0.60 game-time seconds
      • Custom script: set udg_Withering_Fire_On_Cooldown[cv] = false
  • Withering Fire Launch Missile
    • Events
    • Conditions
    • Actions
      • -------- Subtract from the missile count: --------
      • Set VariableSet Withering_Fire_Missile_Count[Withering_Fire_CV] = (Withering_Fire_Missile_Count[Withering_Fire_CV] - 1)
      • -------- --------
      • -------- Try to get a living target from the group: --------
      • Set VariableSet Withering_Fire_Target = (Random unit from Withering_Fire_Target_Group[Withering_Fire_CV])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Withering_Fire_Target is alive) Equal to False
        • Then - Actions
          • -------- We found a dead target, let's clean up any dead units from the group: --------
          • Set VariableSet Withering_Fire_Target = No unit
          • Unit Group - Pick every unit in Withering_Fire_Target_Group[Withering_Fire_CV] and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is alive) Equal to True
                • Then - Actions
                  • -------- It's a valid target --------
                  • Set VariableSet Withering_Fire_Target = (Picked unit)
                • Else - Actions
                  • -------- It's an illegal target --------
                  • Unit Group - Remove (Picked unit) from Withering_Fire_Target_Group[Withering_Fire_CV].
        • Else - Actions
      • -------- --------
      • -------- Either end now or launch a missile: --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • Withering_Fire_Missile_Count[Withering_Fire_CV] Equal to 0
              • Withering_Fire_Target Equal to No unit
        • Then - Actions
          • -------- End now if the group is empty or we ran out of missiles! --------
          • Unit Group - Remove Withering_Fire_Dummy from Withering_Fire_Dummy_Group.
          • Unit - Remove Withering_Fire_Dummy from the game
          • -------- --------
          • -------- Turn off the loop while there is no active Dummy: --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Withering_Fire_Dummy_Group is empty) Equal to True
            • Then - Actions
              • Trigger - Turn off Withering Fire Loop <gen>
            • Else - Actions
        • Else - Actions
          • -------- We found a valid target, launch a missile! --------
          • Set VariableSet Withering_Fire_Point[0] = (Position of Withering_Fire_Caster[Withering_Fire_CV])
          • Set VariableSet Withering_Fire_Point[1] = (Position of Withering_Fire_Target)
          • Set VariableSet Withering_Fire_Point[2] = (Withering_Fire_Point[0] offset by 8.00 towards (Random angle) degrees.)
          • -------- --------
          • Unit - Move Withering_Fire_Dummy instantly to Withering_Fire_Point[2]
          • Unit - Make Withering_Fire_Dummy face (Angle from Withering_Fire_Point[0] to Withering_Fire_Point[1])
          • Unit - Order Withering_Fire_Dummy to Neutral - Firebolt Withering_Fire_Target
          • Special Effect - Create a special effect attached to the chest of Withering_Fire_Dummy using Abilities\Spells\NightElf\shadowstrike\ShadowStrikeMissile.mdl
          • Special Effect - Destroy (Last created special effect)
          • -------- --------
          • Custom script: call RemoveLocation( udg_Withering_Fire_Point[0] )
          • Custom script: call RemoveLocation( udg_Withering_Fire_Point[1] )
          • Custom script: call RemoveLocation( udg_Withering_Fire_Point[2] )
  • Withering Fire Loop
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Withering_Fire_Dummy_Group and do (Actions)
        • Loop - Actions
          • Set VariableSet Withering_Fire_Dummy = (Picked unit)
          • Set VariableSet Withering_Fire_CV = (Custom value of Withering_Fire_Dummy)
          • -------- --------
          • -------- Track how much time has passed: --------
          • Set VariableSet Withering_Fire_Interval[Withering_Fire_CV] = (Withering_Fire_Interval[Withering_Fire_CV] - 0.05)
          • -------- --------
          • -------- Launch a missile every interval: --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Withering_Fire_Interval[Withering_Fire_CV] Less than or equal to 0.01
            • Then - Actions
              • Set VariableSet Withering_Fire_Interval[Withering_Fire_CV] = 0.30
              • Trigger - Run Withering Fire Launch Missile <gen> (ignoring conditions)
            • Else - Actions
Thank u very muchhh, updated the editor, it works like a charm, we can mark this as solved :)
 
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Note that if you change the Interval in the Proc trigger:
  • -------- =========================================================================== --------
  • -------- DEFINE THE MISSILE INTERVAL AND NUMBER OF MISSILES FIRED: --------
  • Set VariableSet Withering_Fire_Interval[Withering_Fire_CV] = 0.30
  • Set VariableSet Withering_Fire_Missile_Count[Withering_Fire_CV] = 5
  • -------- =========================================================================== -------
You will also need to update the Interval in the Loop trigger:
  • Then - Actions
    • Set VariableSet Withering_Fire_Interval[Withering_Fire_CV] = 0.30
 
Last edited:
Level 5
Joined
Feb 22, 2025
Messages
78
Note that if you change the Interval in the Proc trigger:
  • -------- =========================================================================== --------
  • -------- DEFINE THE MISSILE INTERVAL AND NUMBER OF MISSILES FIRED: --------
  • Set VariableSet Withering_Fire_Interval[Withering_Fire_CV] = 0.30
  • Set VariableSet Withering_Fire_Missile_Count[Withering_Fire_CV] = 5
  • -------- =========================================================================== -------
You will also need to update the Interval in the Loop trigger:
  • Then - Actions
    • Set VariableSet Withering_Fire_Interval[Withering_Fire_CV] = 0.30
I've set the interval to 0.35 which allows the dummy enough time to cast the fireball(I'll change the spell needed it for testing cuz i want it to do an actual dmg) and now it looks pretty awesome - the clones keep spawning from her and dissapearing into her which again looks amazing + the arrow play :goblin_boom:
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
With the right setup a Dummy can cast any number of spells in the same game frame. It can even cast these without needing to turn to face it's target.

Base it on the Locust -> Set Movement Type = None, Speed Base = 0, Attacks Enabled = None. The rest is all personal preference for Art related stuff.
 
Level 5
Joined
Feb 22, 2025
Messages
78
With the right setup a Dummy can cast any number of spells in the same game frame. It can even cast these without needing to turn to face it's target.

Base it on the Locust -> Set Movement Type = None, Speed Base = 0, Attacks Enabled = None. The rest is all personal preference for Art related stuff.
Ty! U've made this ability outherworldly :goblin_boom:
 
Level 5
Joined
Feb 22, 2025
Messages
78
With the right setup a Dummy can cast any number of spells in the same game frame. It can even cast these without needing to turn to face it's target.

Base it on the Locust -> Set Movement Type = None, Speed Base = 0, Attacks Enabled = None. The rest is all personal preference for Art related stuff.
I tried to base the damage of ability to 50+ Agility of the caster with this trigger but it's returning nothing
  • Ability - Set Ability: (Unit: Withering_Fire_Dummy's Ability with Ability Code: Firebolt (Neutral Hostile))'s Real Level Field: Damage ('Hbz2') of Level: 0 to (50.00 + (Real((Agility of Sylvanas 0020 <gen> (Exclude bonuses)))))
But this is working
  • Unit - Cause Withering_Fire_Dummy to damage Withering_Fire_Target, dealing (50.00 + (Real((Agility of Sylvanas 0020 <gen> (Exclude bonuses))))) damage of attack type Spells and damage type Normal
* I've set the dmg of firebolt to 0 in OE, level 0 in gui= lvl 1
 
Level 5
Joined
Feb 22, 2025
Messages
78
I'd have to see all of the Actions surrounding your setting of the Ability damage to see where you made a mistake.
  • Set VariableSet Withering_Fire_Dummy = (Last created unit)
  • Ability - Set Ability: (Unit: Withering_Fire_Dummy's Ability with Ability Code: Firebolt (Neutral Hostile))'s Real Level Field: Damage ('Hbz2') of Level: 0 to (50.00 + (Real((Agility of Sylvanas 0020 <gen> (Exclude bonuses)))))
I've set this ability trigger after the creation of the dummy in your Witherin Fire Proc trigger
 
Level 5
Joined
Feb 22, 2025
Messages
78
Can I see ALL of the Actions. One line out of order and the whole thing breaks.
  • Withering Fire Proc
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Sylvanas
      • Withering_Fire_On_Cooldown[(Custom value of (Attacking unit))] Equal to False
    • Actions
      • Custom script: local integer cv = GetUnitUserData( GetAttacker() )
      • Custom script: set udg_Withering_Fire_On_Cooldown[cv] = true
      • -------- --------
      • Set VariableSet Withering_Fire_Caster[0] = (Attacking unit)
      • -------- --------
      • -------- Setup the Dummy unit (1 per cast): --------
      • Set VariableSet Withering_Fire_Point[0] = (Random point in (Region centered at (Position of Withering_Fire_Caster[0]) with size (15.00, 0.00)))
      • Unit - Create 1 Withering Fire for (Owner of Withering_Fire_Caster[0]) at Withering_Fire_Point[0] facing Default building facing degrees
      • Set VariableSet Withering_Fire_Dummy = (Last created unit)
      • Set VariableSet Withering_Fire_CV = (Custom value of Withering_Fire_Dummy)
      • Set VariableSet Withering_Fire_Caster[Withering_Fire_CV] = Withering_Fire_Caster[0]
      • -------- --------
      • -------- Help make the attack animation of the Dummy keep up with the rapid fire casts: --------
      • Animation - Change Withering_Fire_Dummy's animation speed to 300.00% of its original speed
      • -------- --------
      • -------- This is a "just in case" expiration timer that should never finish: --------
      • Unit - Add a 8.00 second Generic expiration timer to Withering_Fire_Dummy
      • -------- --------
      • -------- =========================================================================== --------
      • -------- DEFINE THE MISSILE INTERVAL AND NUMBER OF MISSILES FIRED: --------
      • Set VariableSet Withering_Fire_Interval[Withering_Fire_CV] = 0.35
      • Set VariableSet Withering_Fire_Missile_Count[Withering_Fire_CV] = 2
      • -------- =========================================================================== --------
      • -------- --------
      • -------- Get nearby enemy units: --------
      • Set VariableSet Withering_Fire_Target_Group[Withering_Fire_CV] = (Units within 900.00 of Withering_Fire_Point[0].)
      • Unit Group - Pick every unit in Withering_Fire_Target_Group[Withering_Fire_CV] and do (Actions)
        • Loop - Actions
          • Set VariableSet Withering_Fire_Target = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Withering_Fire_Target belongs to an enemy of (Owner of Withering_Fire_Caster[0]).) Equal to True
              • (Withering_Fire_Target is alive) Equal to True
              • (Withering_Fire_Target is A structure) Equal to False
            • Then - Actions
              • -------- It's a valid target --------
            • Else - Actions
              • -------- It's an illegal target --------
              • Unit Group - Remove Withering_Fire_Target from Withering_Fire_Target_Group[Withering_Fire_CV].
      • Custom script: call RemoveLocation( udg_Withering_Fire_Point[0] )
      • -------- --------
      • -------- Track the Dummy so we can use it in the Loop trigger: --------
      • Unit Group - Add Withering_Fire_Dummy to Withering_Fire_Dummy_Group
      • Trigger - Turn on Withering Fire Loop <gen>
      • -------- --------
      • -------- Launch a missile immediately (OPTIONAL): --------
      • Trigger - Run Withering Fire Launch Missile <gen> (ignoring conditions)
      • -------- --------
      • -------- Manage the cooldown for this effect: --------
      • Wait 0.60 game-time seconds
      • Custom script: set udg_Withering_Fire_On_Cooldown[cv] = false
  • Withering Fire Launch Missile
    • Events
    • Conditions
    • Actions
      • -------- Subtract from the missile count: --------
      • Set VariableSet Withering_Fire_Missile_Count[Withering_Fire_CV] = (Withering_Fire_Missile_Count[Withering_Fire_CV] - 1)
      • -------- --------
      • -------- Try to get a living target from the group: --------
      • Set VariableSet Withering_Fire_Target = (Random unit from Withering_Fire_Target_Group[Withering_Fire_CV])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Withering_Fire_Target is alive) Equal to False
        • Then - Actions
          • -------- We found a dead target, let's clean up any dead units from the group: --------
          • Set VariableSet Withering_Fire_Target = No unit
          • Unit Group - Pick every unit in Withering_Fire_Target_Group[Withering_Fire_CV] and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is alive) Equal to True
                • Then - Actions
                  • -------- It's a valid target --------
                  • Set VariableSet Withering_Fire_Target = (Picked unit)
                • Else - Actions
                  • -------- It's an illegal target --------
                  • Unit Group - Remove (Picked unit) from Withering_Fire_Target_Group[Withering_Fire_CV].
        • Else - Actions
      • -------- --------
      • -------- Either end now or launch a missile: --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • Withering_Fire_Missile_Count[Withering_Fire_CV] Equal to 0
              • Withering_Fire_Target Equal to No unit
        • Then - Actions
          • -------- End now if the group is empty or we ran out of missiles! --------
          • Unit Group - Remove Withering_Fire_Dummy from Withering_Fire_Dummy_Group.
          • Unit - Remove Withering_Fire_Dummy from the game
          • -------- --------
          • -------- Turn off the loop while there is no active Dummy: --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Withering_Fire_Dummy_Group is empty) Equal to True
            • Then - Actions
              • Trigger - Turn off Withering Fire Loop <gen>
            • Else - Actions
        • Else - Actions
          • -------- We found a valid target, launch a missile! --------
          • Set VariableSet Withering_Fire_Point[0] = (Position of Withering_Fire_Caster[Withering_Fire_CV])
          • Set VariableSet Withering_Fire_Point[1] = (Position of Withering_Fire_Target)
          • Set VariableSet Withering_Fire_Point[2] = (Withering_Fire_Point[0] offset by 8.00 towards (Random angle) degrees.)
          • -------- --------
          • Unit - Move Withering_Fire_Dummy instantly to Withering_Fire_Point[2]
          • Unit - Make Withering_Fire_Dummy face (Angle from Withering_Fire_Point[0] to Withering_Fire_Point[1])
          • Ability - Set Ability: (Unit: Withering_Fire_Dummy's Ability with Ability Code: |cffca0000Withering Fire|r |cffca0000(Dummy)|r)'s Real Level Field: Damage ('Hbz2') of Level: 0 to (Real((Agility of Withering_Fire_Caster[0] (Exclude bonuses))))
          • Unit - Order Withering_Fire_Dummy to Neutral - Firebolt Withering_Fire_Target
          • Special Effect - Create a special effect attached to the chest of Withering_Fire_Dummy using Abilities\Spells\NightElf\shadowstrike\ShadowStrikeMissile.mdl
          • Special Effect - Destroy (Last created special effect)
          • -------- --------
          • Custom script: call RemoveLocation( udg_Withering_Fire_Point[0] )
          • Custom script: call RemoveLocation( udg_Withering_Fire_Point[1] )
          • Custom script: call RemoveLocation( udg_Withering_Fire_Point[2] )
  • Withering Fire Loop
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Withering_Fire_Dummy_Group and do (Actions)
        • Loop - Actions
          • Set VariableSet Withering_Fire_Dummy = (Picked unit)
          • Set VariableSet Withering_Fire_CV = (Custom value of Withering_Fire_Dummy)
          • -------- --------
          • -------- Track how much time has passed: --------
          • Set VariableSet Withering_Fire_Interval[Withering_Fire_CV] = (Withering_Fire_Interval[Withering_Fire_CV] - 0.05)
          • -------- --------
          • -------- Launch a missile every interval: --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Withering_Fire_Interval[Withering_Fire_CV] Less than or equal to 0.01
            • Then - Actions
              • Set VariableSet Withering_Fire_Interval[Withering_Fire_CV] = 0.35
              • Trigger - Run Withering Fire Launch Missile <gen> (ignoring conditions)
            • Else - Actions
I actually edited it to cast 1 missile on random target, I tried this with setting the abilitie's real field just before it gets casted but nothing
Also is there a way to add movement speed whenever she attacks for 2 secs - like there would be a buff displayed( is there a way to add a specific buff to the unit)
I was thinking maybe giving her the item ability or just following the:
Unit gets attacked
Attacking unit= Sylvanas
turn off this trigg
Set Sylvanas movement speed to current + exmpl 50
Set timer to 2 secs
Timer expired
Set sylvanas movement speed to default
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Looks like you may have referenced the wrong Damage field. If this Ability is based on Firebolt then those use Damage (Htb1). You can see this information in the Object Editor by switching to Raw data mode (Control + D).

Also, you're referencing Withering_Fire_Caster[0] instead of Withering_Fire_Caster[Withering_Fire_CV].

The Dummy unit is paired to the "caster" through it's custom value (CV) here:
  • Set VariableSet Withering_Fire_Caster[Withering_Fire_CV] = Withering_Fire_Caster[0]
If you don't use the Custom Value variant then you're basically hoping that Wither_Fire_Caster[0] is still referencing the original caster, which might not not be the case if you had more than one Hero with this Withering Fire ability. To clarify, the caster is Sylvanas.

Here's the fix:
  • Ability - Set Ability: (Unit: Withering_Fire_Dummy's Ability with Ability Code: |cffca0000Withering Fire|r |cffca0000(Dummy)|r)'s Real Level Field: Damage ('Htb1') of Level: 0 to (Real((Agility of Withering_Fire_Caster[Withering_Fire_CV] (Exclude bonuses))))
 
Last edited:
Level 5
Joined
Feb 22, 2025
Messages
78
Looks like you may have referenced the wrong Damage field. If this Ability is based on Firebolt then those use Damage (Htb1).

Also, you're referencing Withering_Fire_Caster[0] instead of Withering_Fire_Caster[Withering_Fire_CV].

Here's the fix:
  • Ability - Set Ability: (Unit: Withering_Fire_Dummy's Ability with Ability Code: |cffca0000Withering Fire|r |cffca0000(Dummy)|r)'s Real Level Field: Damage ('Htb1') of Level: 0 to (Real((Agility of Withering_Fire_Caster[Withering_Fire_CV] (Exclude bonuses))))
Oh :")
 
Level 5
Joined
Feb 22, 2025
Messages
78
Looks like you may have referenced the wrong Damage field. If this Ability is based on Firebolt then those use Damage (Htb1). You can see this information in the Object Editor by switching to Raw data mode (Control + D).

Also, you're referencing Withering_Fire_Caster[0] instead of Withering_Fire_Caster[Withering_Fire_CV].

The Dummy unit is paired to the "caster" through it's custom value (CV) here:
  • Set VariableSet Withering_Fire_Caster[Withering_Fire_CV] = Withering_Fire_Caster[0]
If you don't use the Custom Value variant then you're basically hoping that Wither_Fire_Caster[0] is still referencing the original caster, which might not not be the case if you had more than one Hero with this Withering Fire ability. To clarify, the caster is Sylvanas.

Here's the fix:
  • Ability - Set Ability: (Unit: Withering_Fire_Dummy's Ability with Ability Code: |cffca0000Withering Fire|r |cffca0000(Dummy)|r)'s Real Level Field: Damage ('Htb1') of Level: 0 to (Real((Agility of Withering_Fire_Caster[Withering_Fire_CV] (Exclude bonuses))))
Hey, I was playing around with your triggers in an attempt to create another spell where the dummies would spawn periodically for around 10 seconds but sometimes they cast a spell and sometimes they don't, also they don't get removed sometimes but relay on expirational timer. Can you take a look
------------------------------------------------------------------------------------------------
  • BHS Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to BHS
    • Actions
      • Countdown Timer - Start BHS_Timer as a One-shot timer that will expire in 14.00 seconds
      • Set BHS_Timer = (Last started timer)
      • Set BHS_Caster[0] = (Triggering unit)
      • Trigger - Turn on BHS Loop <gen>
  • BHS Fire
    • Events
    • Conditions
    • Actions
      • Set BHS_Missile_Count[BHS_CV] = (BHS_Missile_Count[BHS_CV] - 1)
      • Set BHS_Fire_Target = (Random unit from BHS_Target_Group[BHS_CV])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (BHS_Fire_Target is alive) Equal to False
        • Then - Actions
          • Set BHS_Fire_Target = No unit
          • Unit Group - Pick every unit in BHS_Target_Group[BHS_CV] and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is alive) Equal to True
                • Then - Actions
                  • Set BHS_Fire_Target = (Picked unit)
                • Else - Actions
                  • Unit Group - Remove (Picked unit) from BHS_Target_Group[BHS_CV].
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • BHS_Missile_Count[BHS_CV] Equal to 0
              • BHS_Fire_Target Equal to No unit
        • Then - Actions
          • Unit Group - Remove BHS_Dummy[1] from BHS_Dummy_Group.
          • Unit - Remove BHS_Dummy[1] from the game
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (BHS_Dummy_Group is empty) Equal to True
            • Then - Actions
              • Trigger - Turn off BHS Fire Loop <gen>
            • Else - Actions
        • Else - Actions
          • Set BHS_Fire_Point[1] = (Position of BHS_Dummy[1])
          • Set BHS_Fire_Point[2] = (Position of BHS_Fire_Target)
          • Set BHS_Fire_Point[3] = (BHS_Fire_Point[1] offset by 8.00 towards (Random angle) degrees.)
          • -------- --------
          • Unit - Move BHS_Dummy[1] instantly to BHS_Fire_Point[3]
          • Unit - Make BHS_Dummy[1] face (Angle from BHS_Fire_Point[1] to BHS_Fire_Point[2])
          • Ability - Set Ability: (Unit: BHS_Dummy[1]'s Ability with Ability Code: |cffca0000Withering Fire|r |cffca0000(Dummy)|r)'s Real Level Field: Damage ('Htb1') of Level: 0 to (Real((Agility of BHS_Caster[BHS_CV] (Include bonuses))))
          • Unit - Order BHS_Dummy[1] to Neutral - Firebolt Withering_Fire_Target
          • Special Effect - Create a special effect attached to the chest of BHS_Dummy[1] using Abilities\Spells\NightElf\shadowstrike\ShadowStrikeMissile.mdl
          • Special Effect - Destroy (Last created special effect)
          • -------- --------
          • Remove BHS_Fire_Point[1]
          • Remove BHS_Fire_Point[2]
          • Remove BHS_Fire_Point[3]
  • BHS Fire Loop
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in BHS_Dummy_Group and do (Actions)
        • Loop - Actions
          • Set BHS_Dummy[1] = (Picked unit)
          • Set BHS_CV = (Custom value of BHS_Dummy[1])
          • Set BHS_Fire_Interval[BHS_CV] = (BHS_Fire_Interval[BHS_CV] - 0.05)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Withering_Fire_Interval[Withering_Fire_CV] Less than or equal to 0.01
            • Then - Actions
              • Set BHS_Fire_Interval[BHS_CV] = 0.35
              • Trigger - Run BHS Fire <gen> (ignoring conditions)
            • Else - Actions
  • BHS Stop
    • Events
      • Time - BHS_Timer expires
    • Conditions
    • Actions
      • Trigger - Turn off BHS Loop <gen>
------------------------------------------------------------
* So my idea was to create a spell where the dummies would spawn around the caster for let's say 10 seconds spawn follow the caster and perform the attack or even perform multiple spells(Optimal idea would be if they could cast the spell then do the backflip( a spell I already have in my map) and dissapear middair lol but I'm not that brave to mess with the intervals). Also I was considering to add arrays to dummies and maybe spawn them in a loop every 0.3 sec so there would be more dummies doing a lot of stuff, I guess it would be good to the eye.
* Can you give me some hints, thanks in forward :)
 
Last edited:
Level 45
Joined
Feb 27, 2007
Messages
5,578
BHS Loop isn't shown in that block of triggers above. BHS Fire Loop is, but that appears to be a different trigger because it has no event. (Maybe you add one with a trigger on map init?) These triggers will not work when multiple units cast the spell at the same time, if that is a concern for you.

When posting multiple triggers, put each inside its own [trigger][/trigger] pair so that they are separate within the post text. It's much easier to see and read that way, though sometimes it's useful to combine.
 
Level 5
Joined
Feb 22, 2025
Messages
78
BHS Loop isn't shown in that block of triggers above. BHS Fire Loop is, but that appears to be a different trigger because it has no event. (Maybe you add one with a trigger on map init?) These triggers will not work when multiple units cast the spell at the same time, if that is a concern for you.

When posting multiple triggers, put each inside its own [trigger][/trigger] pair so that they are separate within the post text. It's much easier to see and read that way, though sometimes it's useful to combine.
Sorry, I just realized I didn't put it xx
------------------------------------------------
  • BHS Loop
    • Events
      • Time - Every 0.40 seconds of game time
    • Conditions
    • Actions
      • Custom script: local integer cvBHS = GetUnitUserData( GetTriggerUnit() )
      • Custom script: set udg_BHS_Cooldown[cvBHS] = true
      • Set BHS_Fire_Interval[BHS_CV] = 0.40
      • Set BHS_Fire_Point[0] = (Random point in (Region centered at (Position of |cffff0a32Sylvanas Windrunner|r 0020 <gen>) with size (500.00, 0.00)))
      • Unit - Create 1 Withering Fire for (Owner of BHS_Caster[0]) at BHS_Fire_Point[0] facing Default building facing degrees
      • Set BHS_Dummy[1] = (Last created unit)
      • Set BHS_CV = (Custom value of BHS_Dummy[1])
      • Set BHS_Cooldown[BHS_CV] = True
      • Set BHS_Caster[BHS_CV] = BHS_Caster[0]
      • Set BHS_Missile_Count[BHS_CV] = 3
      • Animation - Change BHS_Dummy[1]'s animation speed to 500.00% of its original speed
      • Special Effect - Create a special effect attached to the chest of BHS_Dummy[1] using Abilities\Spells\NightElf\shadowstrike\ShadowStrikeMissile.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Add a 4.00 second Generic expiration timer to BHS_Dummy[1]
      • Set BHS_Target_Group[BHS_CV] = (Units within 900.00 of BHS_Fire_Point[0].)
      • Unit Group - Pick every unit in BHS_Target_Group[BHS_CV] and do (Actions)
        • Loop - Actions
          • Set BHS_Fire_Target = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (BHS_Fire_Target is alive) Equal to True
              • (BHS_Fire_Target is A structure) Equal to False
              • (BHS_Fire_Target is hidden) Equal to False
              • (BHS_Fire_Target belongs to an enemy of (Owner of BHS_Caster[0]).) Equal to True
            • Then - Actions
            • Else - Actions
              • Unit Group - Remove BHS_Fire_Target from BHS_Target_Group[BHS_CV].
      • Remove BHS_Fire_Point[0]
      • Unit Group - Add BHS_Dummy[1] to BHS_Dummy_Group
      • Trigger - Turn on BHS Fire Loop <gen>
      • Trigger - Run BHS Fire <gen> (ignoring conditions)
      • Wait 0.40 game-time seconds
      • Custom script: set udg_BHS_Cooldown[cvBHS] = false
 
Level 5
Joined
Feb 22, 2025
Messages
78
Hey, I was playing around with your triggers in an attempt to create another spell where the dummies would spawn periodically for around 10 seconds but sometimes they cast a spell and sometimes they don't, also they don't get removed sometimes but relay on expirational timer. Can you take a look
------------------------------------------------------------------------------------------------
  • BHS Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to BHS
    • Actions
      • Countdown Timer - Start BHS_Timer as a One-shot timer that will expire in 14.00 seconds
      • Set BHS_Timer = (Last started timer)
      • Set BHS_Caster[0] = (Triggering unit)
      • Trigger - Turn on BHS Loop <gen>
  • BHS Fire
    • Events
    • Conditions
    • Actions
      • Set BHS_Missile_Count[BHS_CV] = (BHS_Missile_Count[BHS_CV] - 1)
      • Set BHS_Fire_Target = (Random unit from BHS_Target_Group[BHS_CV])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (BHS_Fire_Target is alive) Equal to False
        • Then - Actions
          • Set BHS_Fire_Target = No unit
          • Unit Group - Pick every unit in BHS_Target_Group[BHS_CV] and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is alive) Equal to True
                • Then - Actions
                  • Set BHS_Fire_Target = (Picked unit)
                • Else - Actions
                  • Unit Group - Remove (Picked unit) from BHS_Target_Group[BHS_CV].
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • BHS_Missile_Count[BHS_CV] Equal to 0
              • BHS_Fire_Target Equal to No unit
        • Then - Actions
          • Unit Group - Remove BHS_Dummy[1] from BHS_Dummy_Group.
          • Unit - Remove BHS_Dummy[1] from the game
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (BHS_Dummy_Group is empty) Equal to True
            • Then - Actions
              • Trigger - Turn off BHS Fire Loop <gen>
            • Else - Actions
        • Else - Actions
          • Set BHS_Fire_Point[1] = (Position of BHS_Dummy[1])
          • Set BHS_Fire_Point[2] = (Position of BHS_Fire_Target)
          • Set BHS_Fire_Point[3] = (BHS_Fire_Point[1] offset by 8.00 towards (Random angle) degrees.)
          • -------- --------
          • Unit - Move BHS_Dummy[1] instantly to BHS_Fire_Point[3]
          • Unit - Make BHS_Dummy[1] face (Angle from BHS_Fire_Point[1] to BHS_Fire_Point[2])
          • Ability - Set Ability: (Unit: BHS_Dummy[1]'s Ability with Ability Code: |cffca0000Withering Fire|r |cffca0000(Dummy)|r)'s Real Level Field: Damage ('Htb1') of Level: 0 to (Real((Agility of BHS_Caster[BHS_CV] (Include bonuses))))
          • Unit - Order BHS_Dummy[1] to Neutral - Firebolt Withering_Fire_Target
          • Special Effect - Create a special effect attached to the chest of BHS_Dummy[1] using Abilities\Spells\NightElf\shadowstrike\ShadowStrikeMissile.mdl
          • Special Effect - Destroy (Last created special effect)
          • -------- --------
          • Remove BHS_Fire_Point[1]
          • Remove BHS_Fire_Point[2]
          • Remove BHS_Fire_Point[3]
  • BHS Fire Loop
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in BHS_Dummy_Group and do (Actions)
        • Loop - Actions
          • Set BHS_Dummy[1] = (Picked unit)
          • Set BHS_CV = (Custom value of BHS_Dummy[1])
          • Set BHS_Fire_Interval[BHS_CV] = (BHS_Fire_Interval[BHS_CV] - 0.05)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Withering_Fire_Interval[Withering_Fire_CV] Less than or equal to 0.01
            • Then - Actions
              • Set BHS_Fire_Interval[BHS_CV] = 0.35
              • Trigger - Run BHS Fire <gen> (ignoring conditions)
            • Else - Actions
  • BHS Stop
    • Events
      • Time - BHS_Timer expires
    • Conditions
    • Actions
      • Trigger - Turn off BHS Loop <gen>
------------------------------------------------------------
* So my idea was to create a spell where the dummies would spawn around the caster for let's say 10 seconds spawn follow the caster and perform the attack or even perform multiple spells(Optimal idea would be if they could cast the spell then do the backflip( a spell I already have in my map) and dissapear middair lol but I'm not that brave to mess with the intervals). Also I was considering to add arrays to dummies and maybe spawn them in a loop every 0.3 sec so there would be more dummies doing a lot of stuff, I guess it would be good to the eye.
* Can you give me some hints, thanks in forward :)
Also I’ve noticed that dummies will not fire unless the Caster is firing, I guess that has to do with custom values or intervals, I’ll see what I can do
 
Level 5
Joined
Feb 22, 2025
Messages
78
BHS Loop isn't shown in that block of triggers above. BHS Fire Loop is, but that appears to be a different trigger because it has no event. (Maybe you add one with a trigger on map init?) These triggers will not work when multiple units cast the spell at the same time, if that is a concern for you.

When posting multiple triggers, put each inside its own [trigger][/trigger] pair so that they are separate within the post text. It's much easier to see and read that way, though sometimes it's useful to combine.
  • BHS Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Banshee Shroud
    • Actions
      • Set BHS_Dummy_Group = (Create new unit group)
      • Unit Group - Remove all units from BHS_Dummy_Group.
      • Set BHS_Caster = (Triggering unit)
      • Set BHS_Loop_Index = 0
      • Trigger - Turn on BHS Loop <gen>
      • Trigger - Turn on BHS Recycle <gen>
      • Trigger - Turn on BHS Fire <gen>
  • BHS Loop
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BHS_Loop_Index Less than or equal to 25
        • Then - Actions
          • For each (Integer BHS_Loop_Integer) from 1 to 3, do (Actions)
            • Loop - Actions
              • Set BHS_Clone_Index = (BHS_Loop_Index + 1)
              • Set BHS_Loop_Index = (BHS_Loop_Index + 1)
              • Set BHS_Spawn_Location[BHS_Clone_Index] = (Random point in (Region centered at (Position of BHS_Caster) with size (300.00, 0.00)))
              • Set BHS_Facing = (Position of (Random unit from (Units within 900.00 of (Position of BHS_Caster).)))
              • Unit - Create 1 Withering Fire for (Owner of BHS_Caster) at BHS_Spawn_Location[BHS_Clone_Index] facing BHS_Facing
              • Set BHS_Dummy[BHS_Clone_Index] = (Last created unit)
              • Remove BHS_Facing
              • Unit - Add a 0.40 second Water Elemental expiration timer to BHS_Dummy[BHS_Clone_Index]
              • Animation - Play BHS_Dummy[BHS_Clone_Index]'s stand ready animation
              • Special Effect - Create a special effect attached to the chest of BHS_Dummy[BHS_Clone_Index] using Abilities\Spells\NightElf\shadowstrike\ShadowStrikeMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • Animation - Change BHS_Dummy[BHS_Clone_Index]'s animation speed to 300.00% of its original speed
              • Unit Group - Add BHS_Dummy[BHS_Clone_Index] to BHS_Dummy_Group
              • Custom script: call RemoveLocation( udg_BHS_Spawn_Location[ udg_BHS_Clone_Index])
              • Wait 0.33 seconds
        • Else - Actions
          • Unit Group - Pick every unit in BHS_Dummy_Group and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
          • Trigger - Turn off BHS Fire <gen>
          • Trigger - Turn off (This trigger)
          • Trigger - Turn off BHS Recycle <gen>
  • BHS Fire
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in BHS_Dummy_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
              • ((Picked unit) is hidden) Equal to False
            • Then - Actions
              • Set BHS_Target_Group = (Units within 1050.00 of (Position of BHS_Caster) matching ((((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)) and (((Matching unit) is hidden) Equal to False)) and (((Matching unit) belongs to an enemy of (Own
              • Set BHS_Target = (Random unit from BHS_Target_Group)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (BHS_Target is alive) Equal to True
                  • (BHS_Target is hidden) Equal to False
                • Then - Actions
                  • Special Effect - Create a special effect attached to the chest of BHS_Dummy[BHS_Clone_Index] using Abilities\Spells\NightElf\shadowstrike\ShadowStrikeMissile.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Ability - Set Ability: (Unit: (Picked unit)'s Ability with Ability Code: Unknown (A00Z) |cffca0000(Dummy)|r)'s Real Level Field: Damage ('Htb1') of Level: 0 to (Real((Agility of Withering_Fire_Caster[Withering_Fire_CV] (Include bonuses))))
                  • Unit - Order (Picked unit) to Neutral - Firebolt BHS_Target
                • Else - Actions
                  • Set BHS_Target = No unit
                  • Set BHS_Spawn_Location[1] = (Position of BHS_Caster)
                  • Unit - Order (Picked unit) to Move To BHS_Spawn_Location[1]
                  • Remove BHS_Spawn_Location[1]
                  • Special Effect - Create a special effect attached to the chest of BHS_Dummy[BHS_Clone_Index] using Abilities\Spells\NightElf\shadowstrike\ShadowStrikeMissile.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Unit - Remove (Picked unit) from the game
            • Else - Actions
      • Custom script: call DestroyGroup( udg_BHS_Target_Group)
  • BHS Recycle
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in BHS_Dummy_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is dead) Equal to True
            • Then - Actions
              • Unit - Remove (Picked unit) from the game
            • Else - Actions
--------------------------------------------------------
Guess it could be done better but it get's the job done
 

Attachments

  • BHS.mp4
    7.6 MB

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Some changes that might yield better results:
  • BHS Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Banshee Shroud
    • Actions
      • Unit Group - Pick every unit in BHS_Dummy_Group and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
          • Unit Group - Remove (Picked unit) from BHS_Dummy_Group
      • Set BHS_Caster = (Triggering unit)
      • Set BHS_Loop_Cycles = 75
      • Trigger - Turn on BHS Loop <gen>
      • Trigger - Turn on BHS Recycle <gen>
      • Trigger - Turn on BHS Fire <gen>
  • BHS Loop
    • Events
      • Time - Every 0.33 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BHS_Loop_Cycles Greater than 0
        • Then - Actions
          • Set BHS_Loop_Cycles = (BHS_Loop_Cycles - 1)
          • Set BHS_Spawn_Location[0] = (Position of BHS_Caster)
          • Set BHS_Spawn_Location[1] = (BHS_Spawn_Location[0] offset by 300.00 towards (Random angle))
          • Unit - Create 1 Withering Fire for (Owner of BHS_Caster) at BHS_Spawn_Location[1] facing (Random angle)
          • Set BHS_Dummy = (Last created unit)
          • Unit - Add a 0.40 second Water Elemental expiration timer to BHS_Dummy
          • Animation - Play BHS_Dummy's stand ready animation
          • Special Effect - Create a special effect attached to the chest of BHS_Dummy using Abilities\Spells\NightElf\shadowstrike\ShadowStrikeMissile.mdl
          • Special Effect - Destroy (Last created special effect)
          • Animation - Change BHS_Dummy's animation speed to 300.00% of its original speed
          • Unit Group - Add BHS_Dummy to BHS_Dummy_Group
          • Custom script: call RemoveLocation( udg_BHS_Spawn_Location[0] )
          • Custom script: call RemoveLocation( udg_BHS_Spawn_Location[1] )
        • Else - Actions
          • Unit Group - Pick every unit in BHS_Dummy_Group and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
              • Unit Group - Remove (Picked unit) from BHS_Dummy_Group
          • Trigger - Turn off BHS Fire <gen>
          • Trigger - Turn off (This trigger)
          • Trigger - Turn off BHS Recycle <gen>
  • BHS Fire
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set BHS_Spawn_Location[0] = (Position of BHS_Caster)
      • Unit Group - Pick every unit in BHS_Dummy_Group and do (Actions)
        • Loop - Actions
          • Set BHS_Dummy = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (BHS_Dummy is alive) Equal to True
              • (BHS_Dummy is hidden) Equal to False
            • Then - Actions
              • Set BHS_Target_Group = (Units within 1050.00 of BHS_Spawn_Location[0] matching ((((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)) and (((Matching unit) is hidden) Equal to False)) and (((Matching unit) belongs to an enemy of (Own
              • Set BHS_Target = (Random unit from BHS_Target_Group)
              • Custom script: call DestroyGroup( udg_BHS_Target_Group)
              • Special Effect - Create a special effect attached to the chest of BHS_Dummy using Abilities\Spells\NightElf\shadowstrike\ShadowStrikeMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (BHS_Target is alive) Equal to True
                  • (BHS_Target is hidden) Equal to False
                • Then - Actions
                  • Ability - Set Ability: (Unit: BHS_Dummy's Ability with Ability Code: Unknown (A00Z) |cffca0000(Dummy)|r)'s Real Level Field: Damage ('Htb1') of Level: 0 to (Real((Agility of BHS_Caster (Include bonuses))))
                  • Unit - Order BHS_Dummy to Neutral - Firebolt BHS_Target
                • Else - Actions
                  • Unit - Remove BHS_Dummy from the game
                  • Unit Group - Remove BHS_Dummy from BHS_Dummy_Group
            • Else - Actions
      • Custom script: call RemoveLocation(BHS_Spawn_Location[0])
  • BHS Recycle
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in BHS_Dummy_Group and do (Actions)
        • Loop - Actions
          • Set BHS_Dummy = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (BHS_Dummy is dead) Equal to True
            • Then - Actions
              • Unit - Remove BHS_Dummy from the game
              • Unit Group - Remove BHS_Dummy from BHS_Dummy_Group
            • Else - Actions
Fixed all of the memory leaks, avoided the use of Waits, removed whatever I assumed was unnecessary/unneeded, and added/tweaked stuff to improve performance.

Note that this references an unknown ability:
  • Ability - Set Ability: (Unit: BHS_Dummy's Ability with Ability Code: Unknown (A00Z) |cffca0000(Dummy)|r)'s Real Level Field: Damage ('Htb1') of Level: 0 to (Real((Agility of BHS_Caster (Include bonuses))))
Did you delete that?
 
Last edited:
Level 5
Joined
Feb 22, 2025
Messages
78
Some changes that might yield better results:
  • BHS Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Banshee Shroud
    • Actions
      • Unit Group - Pick every unit in BHS_Dummy_Group and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
          • Unit Group - Remove (Picked unit) from BHS_Dummy_Group
      • Set BHS_Caster = (Triggering unit)
      • Set BHS_Loop_Cycles = 75
      • Trigger - Turn on BHS Loop <gen>
      • Trigger - Turn on BHS Recycle <gen>
      • Trigger - Turn on BHS Fire <gen>
  • BHS Loop
    • Events
      • Time - Every 0.33 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BHS_Loop_Cycles Greater than 0
        • Then - Actions
          • Set BHS_Loop_Cycles = (BHS_Loop_Cycles - 1)
          • Set BHS_Spawn_Location[0] = (Position of BHS_Caster)
          • Set BHS_Spawn_Location[1] = (BHS_Spawn_Location[0] offset by 300.00 towards (Random angle))
          • Unit - Create 1 Withering Fire for (Owner of BHS_Caster) at BHS_Spawn_Location[1] facing (Random angle)
          • Set BHS_Dummy = (Last created unit)
          • Unit - Add a 0.40 second Water Elemental expiration timer to BHS_Dummy
          • Animation - Play BHS_Dummy's stand ready animation
          • Special Effect - Create a special effect attached to the chest of BHS_Dummy using Abilities\Spells\NightElf\shadowstrike\ShadowStrikeMissile.mdl
          • Special Effect - Destroy (Last created special effect)
          • Animation - Change BHS_Dummy's animation speed to 300.00% of its original speed
          • Unit Group - Add BHS_Dummy to BHS_Dummy_Group
          • Custom script: call RemoveLocation( udg_BHS_Spawn_Location[0] )
          • Custom script: call RemoveLocation( udg_BHS_Spawn_Location[1] )
        • Else - Actions
          • Unit Group - Pick every unit in BHS_Dummy_Group and do (Actions)
            • Loop - Actions
              • Unit - Remove (Picked unit) from the game
              • Unit Group - Remove (Picked unit) from BHS_Dummy_Group
          • Trigger - Turn off BHS Fire <gen>
          • Trigger - Turn off (This trigger)
          • Trigger - Turn off BHS Recycle <gen>
  • BHS Fire
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set BHS_Spawn_Location[0] = (Position of BHS_Caster)
      • Unit Group - Pick every unit in BHS_Dummy_Group and do (Actions)
        • Loop - Actions
          • Set BHS_Dummy = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (BHS_Dummy is alive) Equal to True
              • (BHS_Dummy is hidden) Equal to False
            • Then - Actions
              • Set BHS_Target_Group = (Units within 1050.00 of BHS_Spawn_Location[0] matching ((((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)) and (((Matching unit) is hidden) Equal to False)) and (((Matching unit) belongs to an enemy of (Own
              • Set BHS_Target = (Random unit from BHS_Target_Group)
              • Custom script: call DestroyGroup( udg_BHS_Target_Group)
              • Special Effect - Create a special effect attached to the chest of BHS_Dummy using Abilities\Spells\NightElf\shadowstrike\ShadowStrikeMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (BHS_Target is alive) Equal to True
                  • (BHS_Target is hidden) Equal to False
                • Then - Actions
                  • Ability - Set Ability: (Unit: BHS_Dummy's Ability with Ability Code: Unknown (A00Z) |cffca0000(Dummy)|r)'s Real Level Field: Damage ('Htb1') of Level: 0 to (Real((Agility of BHS_Caster (Include bonuses))))
                  • Unit - Order BHS_Dummy to Neutral - Firebolt BHS_Target
                • Else - Actions
                  • Unit - Remove BHS_Dummy from the game
                  • Unit Group - Remove BHS_Dummy from BHS_Dummy_Group
            • Else - Actions
      • Custom script: call RemoveLocation(BHS_Spawn_Location[0])
  • BHS Recycle
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in BHS_Dummy_Group and do (Actions)
        • Loop - Actions
          • Set BHS_Dummy = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (BHS_Dummy is dead) Equal to True
            • Then - Actions
              • Unit - Remove BHS_Dummy from the game
              • Unit Group - Remove BHS_Dummy from BHS_Dummy_Group
            • Else - Actions
Fixed all of the memory leaks, avoided the use of Waits, removed whatever I assumed was unnecessary/unneeded, and added/tweaked stuff to improve performance.

Note that this references an unknown ability:
  • Ability - Set Ability: (Unit: BHS_Dummy's Ability with Ability Code: Unknown (A00Z) |cffca0000(Dummy)|r)'s Real Level Field: Damage ('Htb1') of Level: 0 to (Real((Agility of BHS_Caster (Include bonuses))))
Did you delete that?
This works wonders! Actually that was a missing tooltip of the ability :") I tried to leave the name of the ability blank so it won't show in the floating text whenever it gets casted, since I have a built in dmg system in triggers, but it's still refenrencing the correct ability and dealing damage as intended
 
Top