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

[Trigger] Spell - How to make unit launch Rocket and then deal damage once the it hits.

Status
Not open for further replies.
Level 7
Joined
Aug 5, 2010
Messages
147
Im making an ability that has a chance to deal AOE damage to units around the attacking unit.

Here is the trigger, Reactive_Damage is defined in another trigger.
  • Reactive Attack
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (Unit-type of DamageEventTarget) Equal to Marine [Agi]
    • Actions
      • Set Reactive_Attacker = DamageEventSource
      • Set Reactive_Hero = DamageEventTarget
      • Set Reactive_Point = (Position of Reactive_Attacker)
      • Set Reactive_Group = (Units within 200.00 of Reactive_Point matching (((Matching unit) belongs to an enemy of (Owner of Reactive_Hero)) Equal to True))
      • Set Reactive_Chance = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Reactive_Hero has buff Reactive Armor ) Equal to True
          • Reactive_Chance Less than or equal to 20
        • Then - Actions
          • Unit Group - Pick every unit in Reactive_Group and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between (Position of Reactive_Hero) and (Position of Reactive_Attacker)) Less than or equal to 300.00
                  • ((Picked unit) is A structure) Equal to False
                  • ((Picked unit) is Magic Immune) Equal to False
                  • ((Picked unit) is alive) Equal to True
                • Then - Actions
                  • Special Effect - Create a special effect at Reactive_Point using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Unit - Cause Reactive_Hero to damage (Picked unit), dealing Reactive_Damage[(Level of Reactive Armor for Reactive_Hero)] damage of attack type Spells and damage type Normal
                • Else - Actions
        • Else - Actions
      • Custom script: call DestroyGroup(udg_Reactive_Group)
      • Custom script: call RemoveLocation(udg_Reactive_Point)
How do i make it so a Cluster Rocket will be launched towards units further than 300 range away and deal Aoe damage to the unit and units around it when the rocket hits.
 
If you want the special effects of Cluster Rocket, just make an ability based off it, then create a dummy when Reactive_Chance is met, and order the dummy to cast on the point you want it to. Also, you should move Reactive_Point & Group inside the If/Then/Else (along with the custom scripts that remove their reference). There's no sense in creating objects for those unless Reactive_Chance is met.
 
Level 7
Joined
Aug 5, 2010
Messages
147
If you want the special effects of Cluster Rocket, just make an ability based off it, then create a dummy when Reactive_Chance is met, and order the dummy to cast on the point you want it to. Also, you should move Reactive_Point & Group inside the If/Then/Else (along with the custom scripts that remove their reference). There's no sense in creating objects for those unless Reactive_Chance is met.

I only want the missle of Cluster Rockets not the entire effect which i was easily able to do using storm bolt as the dummy ability and just changing the missile art to the cluster rocket missile.

I created the dummy unit and ability, fixed the triggers and made the trigger create a dummy and order it to use the ability if the distance between Attacker and Attacked unit is more than or equal to 301.

Heres the trigger, it works exactly how i want it to but if it can be improved please do tell.

  • Reactive Attack
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (Unit-type of DamageEventTarget) Equal to Marine [Agi]
    • Actions
      • Set Reactive_Attacker = DamageEventSource
      • Set Reactive_Hero = DamageEventTarget
      • Set Reactive_Chance = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Reactive_Hero has buff Reactive Armor ) Equal to True
          • Reactive_Chance Less than or equal to 20
        • Then - Actions
          • Set Reactive_Point = (Position of Reactive_Attacker)
          • Set Reactive_Group = (Units within 200.00 of Reactive_Point matching (((Matching unit) belongs to an enemy of (Owner of Reactive_Hero)) Equal to True))
          • Unit Group - Pick every unit in Reactive_Group and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between (Position of Reactive_Hero) and (Position of Reactive_Attacker)) Less than or equal to 300.00
                  • ((Picked unit) is A structure) Equal to False
                  • ((Picked unit) is Magic Immune) Equal to False
                  • ((Picked unit) is alive) Equal to True
                • Then - Actions
                  • Special Effect - Create a special effect at Reactive_Point using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Unit - Cause Reactive_Hero to damage (Picked unit), dealing Reactive_Damage[(Level of Reactive Armor for Reactive_Hero)] damage of attack type Spells and damage type Normal
                  • Custom script: call DestroyGroup(udg_Reactive_Group)
                  • Custom script: call RemoveLocation(udg_Reactive_Point)
                • Else - Actions
                  • Unit Group - Pick every unit in Reactive_Group and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Distance between (Position of Reactive_Hero) and (Position of Reactive_Attacker)) Greater than or equal to 301.00
                          • ((Picked unit) is A structure) Equal to False
                          • ((Picked unit) is Magic Immune) Equal to False
                          • ((Picked unit) is alive) Equal to True
                        • Then - Actions
                          • Unit - Create 1 Reactive Armor Dummy for (Owner of Reactive_Hero) at (Position of Reactive_Hero) facing Default building facing degrees
                          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt Reactive_Attacker
                          • Unit - Cause Reactive_Hero to damage (Picked unit), dealing Reactive_Damage[(Level of Reactive Armor for Reactive_Hero)] damage of attack type Spells and damage type Normal
                          • Unit - Remove (Last created unit) from the game
                          • Custom script: call DestroyGroup(udg_Reactive_Group)
                          • Custom script: call RemoveLocation(udg_Reactive_Point)
                        • Else - Actions
        • Else - Actions
I was going to ask if a question about making it only do damage when the Rockect hits but i set the missile speed to 3000 which makes the time difference between missile hit and damage caused negligible whilst still having the the missile effect obvious to the player.
 
Your triggers are all wrong in terms of destroying leaks. You need to move call DestroyGroup() and call RemoveLocation() outside of the unit group loop.

On a side note, I think I understand what you're trying to do now. If you want a "missle" effect, then you will need to either use a Missle system or trigger the whole thing yourself (it's fairly easy if there is no height involved).

If I'm understanding this correctly, you just want to deal instant damage within an AoE, and if any units are further than 300 units away, you want to create a "missle" effect that will move to each unit?
 
Level 7
Joined
Aug 5, 2010
Messages
147
Your triggers are all wrong in terms of destroying leaks. You need to move call DestroyGroup() and call RemoveLocation() outside of the unit group loop.

Ah Thanks for that

If I'm understanding this correctly, you just want to deal instant damage within an AoE, and if any units are further than 300 units away, you want to create a "missle" effect that will move to each unit?

Yes, since units within 300 units dont need to have the missle i can just deal damage to them immediately but dealing instant damage to units further away without any kind of projectile doesnt look right which is why i want a projectile, if i can get the missle and damage to hit at the same time then thats more of a bonus since im happy with the results of how it currently works.
 
Yes, since units within 300 units dont need to have the missle i can just deal damage to them immediately but dealing instant damage to units further away without any kind of projectile doesnt look right which is why i want a projectile, if i can get the missle and damage to hit at the same time then thats more of a bonus since im happy with the results of how it currently works.

That will get extremely complicated then. An easy way to do it is to just use an object editor spell that has a missle art, then creating a dummy for each unit that is outside of the 300 radius, and ordering the unit to cast said spell to them. You can easily do this with just one unit group loop, all you need is a "maximum" radius to check for. So let's say you want units within a 600 radius to be damaged by the spell, but units that are not within the 300 radius will get the missle effect:
  • Set Owner = (Owner of Reactive_Attacker)
  • Set Reactive_Point = (Position of Reactive_Attacker)
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units within 600.00 of Reactive_Point) and do (Actions)
    • Loop - Actions
      • Set TempUnit = (Picked unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (TempUnit is A structure) Equal to False
          • (TempUnit is Magic Immune) Equal to False
          • (TempUnit is alive) Equal to True
          • (TempUnit belongs to an enemy of Owner) Equal to True
        • Then - Actions
          • Set TempLoc = (Position of TempUnit)
          • Set Distance = (Distance between Reactive_Point and TempLoc)
          • -------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Distance Less than or equal to 300.00
            • Then - Actions
              • -------- JUST DEAL DAMAGE --------
            • Else - Actions
              • -------- CREATE DUMMY CASTER, ORDER TO CAST ON TempUnit --------
          • -------- --------
          • Custom script: call RemoveLocation(udg_TempLoc)
        • Else - Actions
  • Custom script: call RemoveLocation(udg_Reactive_Point)


Again, this is the more easy way of doing it. However, I recommend just using a Missle System to create the missle effects so that you have more freedom and control over it.
 
Level 7
Joined
Aug 5, 2010
Messages
147
That will get extremely complicated then. An easy way to do it is to just use an object editor spell that has a missle art, then creating a dummy for each unit that is outside of the 300 radius, and ordering the unit to cast said spell to them. You can easily do this with just one unit group loop, all you need is a "maximum" radius to check for. So let's say you want units within a 600 radius to be damaged by the spell, but units that are not within the 300 radius will get the missle effect:
  • Set Owner = (Owner of Reactive_Attacker)
  • Set Reactive_Point = (Position of Reactive_Attacker)
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units within 600.00 of Reactive_Point) and do (Actions)
    • Loop - Actions
      • Set TempUnit = (Picked unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (TempUnit is A structure) Equal to False
          • (TempUnit is Magic Immune) Equal to False
          • (TempUnit is alive) Equal to True
          • (TempUnit belongs to an enemy of Owner) Equal to True
        • Then - Actions
          • Set TempLoc = (Position of TempUnit)
          • Set Distance = (Distance between Reactive_Point and TempLoc)
          • -------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Distance Less than or equal to 300.00
            • Then - Actions
              • -------- JUST DEAL DAMAGE --------
            • Else - Actions
              • -------- CREATE DUMMY CASTER, ORDER TO CAST ON TempUnit --------
          • -------- --------
          • Custom script: call RemoveLocation(udg_TempLoc)
        • Else - Actions
  • Custom script: call RemoveLocation(udg_Reactive_Point)


Again, this is the more easy way of doing it. However, I recommend just using a Missle System to create the missle effects so that you have more freedom and control over it.

Ill just leave it as it is for now but thanks for the help.
 
Level 7
Joined
Aug 5, 2010
Messages
147
I had a problem of the dummy units not being removed when the trigger is activated from a large number of units attacking the hero. I added an expiration timer to remedy this, i tested it ingame and their were no left over units appearing.

Here is the fixed trigger.
  • Reactive Attack
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (Unit-type of DamageEventTarget) Equal to Marine [Agi]
    • Actions
      • Set Reactive_Attacker = DamageEventSource
      • Set Reactive_Hero = DamageEventTarget
      • Set Reactive_Chance = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Reactive_Hero has buff Reactive Armor ) Equal to True
          • Reactive_Chance Less than or equal to 20
        • Then - Actions
          • Set Reactive_Point = (Position of Reactive_Attacker)
          • Set Reactive_Group = (Units within 200.00 of Reactive_Point matching (((Matching unit) belongs to an enemy of (Owner of Reactive_Hero)) Equal to True))
          • Unit Group - Pick every unit in Reactive_Group and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between (Position of Reactive_Hero) and (Position of Reactive_Attacker)) Less than or equal to 300.00
                  • ((Picked unit) is A structure) Equal to False
                  • ((Picked unit) is Magic Immune) Equal to False
                  • ((Picked unit) is alive) Equal to True
                • Then - Actions
                  • Special Effect - Create a special effect at Reactive_Point using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Unit - Cause Reactive_Hero to damage (Picked unit), dealing Reactive_Damage[(Level of Reactive Armor for Reactive_Hero)] damage of attack type Spells and damage type Normal
                • Else - Actions
                  • Unit Group - Pick every unit in Reactive_Group and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Distance between (Position of Reactive_Hero) and (Position of Reactive_Attacker)) Greater than or equal to 301.00
                          • ((Picked unit) is A structure) Equal to False
                          • ((Picked unit) is Magic Immune) Equal to False
                          • ((Picked unit) is alive) Equal to True
                        • Then - Actions
                          • Unit - Create 1 Reactive Armor Dummy for (Owner of Reactive_Hero) at (Position of Reactive_Hero) facing Default building facing degrees
                          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt Reactive_Attacker
                          • Unit - Cause Reactive_Hero to damage (Picked unit), dealing Reactive_Damage[(Level of Reactive Armor for Reactive_Hero)] damage of attack type Spells and damage type Normal
                        • Else - Actions
          • Custom script: call RemoveLocation(udg_Reactive_Point)
          • Custom script: call DestroyGroup(udg_Reactive_Group)
        • Else - Actions
Now im assuming that 1 second is more than enough for the trigger to complete the actions after the expiration time is added, am i correct in my assumption?
 
I had a problem of the dummy units not being removed when the trigger is activated from a large number of units attacking the hero. I added an expiration timer to remedy this, i tested it ingame and their were no left over units appearing.
Yah of course. Did you think they magically disappeared? x)

Here is the fixed trigger.
  • Reactive Attack
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (Unit-type of DamageEventTarget) Equal to Marine [Agi]
    • Actions
      • Set Reactive_Attacker = DamageEventSource
      • Set Reactive_Hero = DamageEventTarget
      • Set Reactive_Chance = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Reactive_Hero has buff Reactive Armor ) Equal to True
          • Reactive_Chance Less than or equal to 20
        • Then - Actions
          • Set Reactive_Point = (Position of Reactive_Attacker)
          • Set Reactive_Group = (Units within 200.00 of Reactive_Point matching (((Matching unit) belongs to an enemy of (Owner of Reactive_Hero)) Equal to True))
          • Unit Group - Pick every unit in Reactive_Group and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between (Position of Reactive_Hero) and (Position of Reactive_Attacker)) Less than or equal to 300.00
                  • ((Picked unit) is A structure) Equal to False
                  • ((Picked unit) is Magic Immune) Equal to False
                  • ((Picked unit) is alive) Equal to True
                • Then - Actions
                  • Special Effect - Create a special effect at Reactive_Point using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Unit - Cause Reactive_Hero to damage (Picked unit), dealing Reactive_Damage[(Level of Reactive Armor for Reactive_Hero)] damage of attack type Spells and damage type Normal
                • Else - Actions
                  • Unit Group - Pick every unit in Reactive_Group and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Distance between (Position of Reactive_Hero) and (Position of Reactive_Attacker)) Greater than or equal to 301.00
                          • ((Picked unit) is A structure) Equal to False
                          • ((Picked unit) is Magic Immune) Equal to False
                          • ((Picked unit) is alive) Equal to True
                        • Then - Actions
                          • Unit - Create 1 Reactive Armor Dummy for (Owner of Reactive_Hero) at (Position of Reactive_Hero) facing Default building facing degrees
                          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt Reactive_Attacker
                          • Unit - Cause Reactive_Hero to damage (Picked unit), dealing Reactive_Damage[(Level of Reactive Armor for Reactive_Hero)] damage of attack type Spells and damage type Normal
                        • Else - Actions
          • Custom script: call RemoveLocation(udg_Reactive_Point)
          • Custom script: call DestroyGroup(udg_Reactive_Group)
        • Else - Actions
You just looove not using my triggers :p the one I showed you only uses one unit group loop while yours uses 2.

  • Set Owner = (Owner of Reactive_Attacker)
  • Set Reactive_Point = (Position of Reactive_Attacker)
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units within 600.00 of Reactive_Point) and do (Actions)
    • Loop - Actions
      • Set TempUnit = (Picked unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (TempUnit is A structure) Equal to False
          • (TempUnit is Magic Immune) Equal to False
          • (TempUnit is alive) Equal to True
          • (TempUnit belongs to an enemy of Owner) Equal to True
        • Then - Actions
          • Set TempLoc = (Position of TempUnit)
          • Set Distance = (Distance between Reactive_Point and TempLoc)
          • -------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Distance Less than or equal to 300.00
            • Then - Actions
              • -------- JUST DEAL DAMAGE --------
            • Else - Actions
              • -------- CREATE DUMMY CASTER, ORDER TO CAST ON TempUnit --------
          • -------- --------
          • Custom script: call RemoveLocation(udg_TempLoc)
        • Else - Actions
  • Custom script: call RemoveLocation(udg_Reactive_Point)


Anyway, if you want to just use yours, here are some things to consider:
    • (Distance between (Position of Reactive_Hero) and (Position of Reactive_Attacker)) Less than or equal to 300.00
    ^This leaks two locations
    • (Distance between (Position of Reactive_Hero) and (Position of Reactive_Attacker)) Greater than or equal to 301.00
    ^This leaks two locations
    • Unit - Create 1 Reactive Armor Dummy for (Owner of Reactive_Hero) at (Position of Reactive_Hero) facing Default building facing degrees
    ^This leaks one location
    • Special Effect - Create a special effect at Reactive_Point using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
    ^You have this inside the unit group loop, that means this special effect will appear on Reactive_Attacker for every unit that passes the filter. Is this intended?
  • I suggest storing (Owner of Reactive Hero) into a temp player variable

Now im assuming that 1 second is more than enough for the trigger to complete the actions after the expiration time is added, am i correct in my assumption?
Yes you are right. Most spells, if not all, only need 1 second. You could also probably get away with only using one global dummy caster so you don't have to create a unique unit for each unit affected. I say "probably get away" because some spells (ex: Chain Lightning) disables the casting unit.


EDIT: I just realized that either I dont understand your ability or your trigger logic is all wrong. You only find the distance between the damaged target and the damage source...? From what I understood, you wanted units within a 300 aoe to take instant damage, and units greater than 301 to get a missle effect. I dont even see how thats possible considering you initiliaze the group to units within a 200 AoE.
 
Last edited:
Level 7
Joined
Aug 5, 2010
Messages
147
Yah of course. Did you think they magically disappeared? x)
Ofc i didnt think that, i was using Unit - Remove (Last created unit) from the game originally and that wasnt getting rid of all units so i added the timer instead and that fixed it.

I changed the trigger to be similer to yours, theirs now only 1 group loop, i also fixed the leaks but whats the reasoning behind setting the Owner of the Attacked unit into a Player variable? The only unit that can activate the trigger is the Hero and only if it has the buff and theirs only going to be one Hero of that type on the map.

The FragBoom effect is only there for melee units and is intended

EDIT: I just realized that either I dont understand your ability or your trigger logic is all wrong. You only find the distance between the damaged target and the damage source...? From what I understood, you wanted units within a 300 aoe to take instant damage, and units greater than 301 to get a missle effect. I dont even see how thats possible considering you initiliaze the group to units within a 200 AoE.

Aoe damage is dealt within a 200 Aoe of the attacking unit, melee attackers [units within 300 range of the hero] have just the FragBoom effect, ranged units [units further than 300 range of the hero] get the missile effect.

I also just noticed a visual bug with the missle effect, because the unit casting the dummy spell was within the unit group the missle effect was happening to all picked units but the spell wasnt.

Heres the current trigger, with a fix for the bug and comments on how to re-enable to bug.

  • Reactive Attack
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (Unit-type of DamageEventTarget) Equal to Marine [Agi]
    • Actions
      • Set Reactive_Attacker = DamageEventSource
      • Set Reactive_Hero = DamageEventTarget
      • Set Reactive_Chance = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Reactive_Hero has buff Reactive Armor ) Equal to True
          • Reactive_Chance Less than or equal to 20
        • Then - Actions
          • Set Reactive_APoint = (Position of Reactive_Attacker)
          • Set Reactive_HPoint = (Position of Reactive_Hero)
          • Set Reactive_Group = (Units within 200.00 of Reactive_APoint matching (((Matching unit) belongs to an enemy of (Owner of Reactive_Hero)) Equal to True))
          • -------- Disable this to see visual bug --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between Reactive_HPoint and Reactive_APoint) Greater than or equal to 301.00
            • Then - Actions
              • Unit - Create 1 Reactive Armor Dummy for (Owner of Reactive_Hero) at Reactive_HPoint facing Default building facing degrees
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt Reactive_Attacker
            • Else - Actions
          • Unit Group - Pick every unit in Reactive_Group and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between Reactive_HPoint and Reactive_APoint) Less than or equal to 300.00
                  • ((Picked unit) is A structure) Equal to False
                  • ((Picked unit) is Magic Immune) Equal to False
                  • ((Picked unit) is alive) Equal to True
                • Then - Actions
                  • Special Effect - Create a special effect at Reactive_APoint using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Unit - Cause Reactive_Hero to damage (Picked unit), dealing Reactive_Damage[(Level of Reactive Armor [Passive] for Reactive_Hero)] damage of attack type Spells and damage type Normal
                • Else - Actions
                  • -------- Re-enable these to see the visual bug. --------
                  • Unit - Create 1 Reactive Armor Dummy for (Owner of Reactive_Hero) at Reactive_HPoint facing Default building facing degrees
                  • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                  • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt Reactive_Attacker
                  • Unit - Cause Reactive_Hero to damage (Picked unit), dealing Reactive_Damage[(Level of Reactive Armor [Passive] for Reactive_Hero)] damage of attack type Spells and damage type Normal
          • Custom script: call RemoveLocation(udg_Reactive_APoint)
          • Custom script: call RemoveLocation(udg_Reactive_HPoint)
          • Custom script: call DestroyGroup(udg_Reactive_Group)
        • Else - Actions
I will attach the map itself to this post, so you can get a better idea of everything.
 
Last edited:
whats the reasoning behind setting the Owner of the Attacked unit into a Player variable?
Just for efficiency. You constantly call the function GetOwningPlayer() when you check for filters in the Unit Group loop and when you create the dummy, so might as well just store it into a variable instead of finding out who the owner is.


Aoe damage is dealt within a 200 Aoe of the attacking unit, melee attackers [units within 300 range of the hero] have just the FragBoom effect, ranged units [units further than 300 range of the hero] get the missile effect.
OH so you send a "missle" effect to the attacking unit, and then deal AoE damage to them. On top of that, you deal instant AoE damage to units around you, and for units that are further than that, you send the missle effect? I apologize, I will need to rework the triggers then.

The only problem with the current triggers is that you don't have a maximum range units can be affected by the spell? How are you supposed to know where the 300 range line is?

I also just noticed a visual bug with the missle effect, because the unit casting the dummy spell was within the unit group the missle effect was happening to all picked units but the spell wasnt.
But the spell wasn't? I don't get what you mean by that statement.
 
Level 7
Joined
Aug 5, 2010
Messages
147
Just for efficiency. You constantly call the function GetOwningPlayer() when you check for filters in the Unit Group loop and when you create the dummy, so might as well just store it into a variable instead of finding out who the owner is.



OH so you send a "missle" effect to the attacking unit, and then deal AoE damage to them. On top of that, you deal instant AoE damage to units around you, and for units that are further than that, you send the missle effect? I apologize, I will need to rework the triggers then.

The only problem with the current triggers is that you don't have a maximum range units can be affected by the spell? How are you supposed to know where the 300 range line is?


But the spell wasn't? I don't get what you mean by that statement.

Ok ill set owning player to a variable.

Im not sure what the correct terminology is for the distance between 2 things, both units and range have been used to describe distance between 2 things in this thread, i interpret them as the same thing and i was gonna ask a question about this before i got sidetracked by the visual bug. So consider this me asking that question.

When the spell is completed, the targeted unit is stunned and a small impact crater appears underneath it, but the bug was causing only the missile effect to be casted on the units effect by the Aoe damage not the entire spell, i didnt have a clue why it was happening since the dummy never targets the picked units so i just moved the entire dummy part out of the Unit Loop and that fixed it. Its probably better if you just use the map to fully understand it.
 
Man this spell description is confusing lol. Let me see if I understand this:

"When the caster is hit, there is an X% chance for a missle to be launched to the attacker. When the missle impacts, it will deal AoE damage around the attacker. In addition, units within SOME_VARIABLE AoE of the caster will take damage."

If this is true, you still haven't answered my question on what "SOME_VARIABLE" represents? You need some type of max radius to check for when you want to see if units are within the 300 AoE or not. This is how I see it:
  • Units within 0-300 AoE of the caster will take instant damage
  • Units within 301-SOME_VARIABLE AoE of the caster will have a missle effect launched towards them.
 
Status
Not open for further replies.
Top