• 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.

Explode on death

Level 16
Joined
Dec 12, 2021
Messages
206
I need a spell that when a specific unit dies, it explodes and does damage to either the enemy flying or ground units (I would like that to be eligible), and that also has its own animation or special effects, for example that when it dies it casts a certain type of acid to nearby enemy units at rank that spreads
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,867
That's not enough information to fully understand what you want to accomplish. Try to use Warcraft 3 terms that you've seen in the Object Editor. Also, please let us know which version you're on.

Questions:

Is it a Buff? Think about how a spell like Bloodlust works, it applies a Buff on the target for a limited Duration.

If it is a Buff, can it be dispelled? Control Magic, Abolish Magic, etc. All of this needs to be considered.

What do you mean by explodes? Exploding is a mechanic in Warcraft 3 which removes a unit from the game and doesn't leave behind a corpse. An ability like Incinerate causes it's target to explode on death.

The acid request is pretty vague. Do you want someone to design that specific ability for you as well? Or was that just an example? What does spreading even mean? Does it spread like the Abomination's Disease Cloud? Or is it like the Alchemist's Acid Spray from DotA but with an increasing Area of Effect over time? Some examples from popular video games would help a lot.
 
Last edited:
Level 16
Joined
Dec 12, 2021
Messages
206
Hmmm, maybe when I translate it from Spanish to English I change its meaning a little, but I will do it again, before that, I want to say that I need the spell in GUI, and I use version 1.27.1 and that it is true that the maps that Use more recent versions of the editor, I can't open them so I would prefer that the triggers be sent to me visible here in the hive or via screenshot. Having said that, I will go on to explain the spell I need:
Passive spell: Unit (Couatl) upon death will do 100 damage to nearby enemy units (whether they are ground or air, the enemy units I want it to be eligible) in a radius of 350 AOE around it (the number and unit is only a example), and in turn slows the units that caused the damage for 3 seconds.
An example is the death of WK from Dota 2, who when he dies launches his first ability that stuns the enemies and slows them down for the first seconds, but in my case I do not want the stun, but it is enough for me to cause 100 damage and Slow nearby enemies for 3 seconds.
EDIT: I forgot to mention something important, it is about the animation produced when dying, which when my couatl dies, it will throw, for example, poison to the nearby units that will affect them (the poison is an example, it could be enough to just add for example the missile attack animation of the hydras or chimeras at the moment my couatl dies, and this missile is directed towards the nearby units that will do the effect or rather the damage)

Wraith King Death (WK) insert this little video, maybe it doesn't look good, but if you are a dota 2 player you will understand perfectly what I'm saying, when WK dies he casts a kind of spell that stuns nearby enemies, well, it's this animation that I would like in the spell I'm asking for.
 
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,867
Okay, that makes a lot of sense. Here's how you can trigger it:
  • Events
    • Unit - A unit Dies
  • Conditions
    • (Level of Couatl Explosion for (Triggering unit)) Greater than 0
  • Actions
    • Set CE_Caster = (Triggering unit)
    • Set CE_Point = (Position of CE_Caster)
    • Set CE_Level = (Level of (Ability being cast) for CE_Caster0
    • -------- --------
    • -------- Create dummy unit to cast acid bomb: --------
    • Unit - Create 1 Dummy for (Owner of CE_Caster) at CE_Point facing default building degrees
    • Set CE_Dummy = (Last created unit)
    • Unit - Add Couatl Dummy to CE_Dummy
    • Unit - Set level of Couatl Dummy for CE_Dummy to CE_Level
    • Unit - Add a 10.00 second Generic expiration timer to CE_Dummy
    • -------- --------
    • -------- Set area of effect and damage based on ability level: --------
    • Set CE_AoE = (250.00 + (100.00 x (Real(CE_Level)))
    • Set CE_Damage = (50.00 + (50.00 x (Real(CE_Level)))
    • -------- --------
    • -------- Deal damage and slow in the area of effect: --------
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units within CE_AoE of CE_Point) and do (Actions)
      • Loop - Actions
        • Set CE_Target = (Picked unit)
        • Unit - Order CE_Dummy to Neutral - Alchemist - Acid Bomb CE_Target
        • Unit - Cause CE_Caster to damage CE_Target, dealing CE_Damage damage of attack type Spells and damage type Normal
    • -------- --------
    • -------- Clean up point memory leak: --------
    • Custom script: call RemoveLocation( udg_CE_Point )
Variable Types:
CE_Caster = Unit
CE_Dummy = Unit
CE_Target = Unit
CE_Point = Point
CE_Level = Integer
CE_AoE = Real
CE_Damage = Real

Couatl Explosion
is an ability based on Storm Hammers. It does nothing but represents the Hero skill which can be leveled up.

Couatl Dummy is an ability based on Acid Bomb. It fires the Hydra acid missile and slows enemy units. You can also modify it to deal damage over time and reduce Armor as well if you'd like. Otherwise, set those values to 0.00. Set it's Area of Effect to 0.00, Cast Range to 99999.00, Cooldown to 0.00, and Mana Cost to 0.00.

The Dummy unit should be based on the Locust with the following changes:
Movement Type = None, Speed Base = None, Model = None, Shadow = None, Attacks Enabled = None.

Make sure you do exactly as I said! It can all break if you miss a single step.
 
Last edited:
Level 16
Joined
Dec 12, 2021
Messages
206
Well, I was doing it and it did partly work to some extent, but I noticed 2 main errors, first that the hydra missile only targets 1 unit, when in reality it should target all enemies within range (the purpose of this is more that nothing a unique and attractive visual effect), and the second point is that when my unit dies it also causes damage to my other unit, which is the king of the mountain (in this test map I put a rifleman), when it should only deal damage to enemy units and not to my allies, please if you would help me with that I would be complete:)
 

Attachments

  • EXPLODE ON DEATH.w3x
    18.1 KB · Views: 5

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,867
first that the hydra missile only targets 1 unit, when in reality it should target all enemies within range
You made a mistake somewhere. Your Dummy unit isn't setup properly and/or your ability has a cooldown.

also causes damage to my other unit
Add an If Then Else that checks different Conditions regarding CE_Target:
  • Loop - Actions
    • Set CE_Target = (Picked unit)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (CE_Target belongs to an enemy of (Owner of CE_Caster)) Equal to True
        • (CE_Target is Alive) Equal to True
      • Then - Actions
        • ...
      • Else - Actions
You can add as many Conditions as you want here. This is like your Targets Allowed field.
 
Level 16
Joined
Dec 12, 2021
Messages
206
Bro, sorry to bother you again, I have one last small problem, I just passed the trigger to my map, and the truth is that by doing small tests I see that when the unit dies and the trigger is executed, a brutal lag is triggered, I don't know if Maybe I did something wrong, or if there is something to avoid all this, please help :(

I left you my map so that you can do it please and give me some option for a solution to this problem, the unit with the spell is the "Rayo abisal" in Spanish, not a Couatl as I told you initially, and the trigger is located within the triggers folders in the naga skills folder
 

Attachments

  • (8)NuevaOrden_Alternativo.w3x
    3.6 MB · Views: 6

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,867
Not too sure, it could be because of the Damage Engine. It looks like you didn't configure it properly:
1735341827856.png


But you can try this setup which delays the damage and adds some extra Conditions:
  • ExplodeOnDeath
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Level of Agonía tóxica for (Triggering unit)) Greater than 0
    • Actions
      • Set VariableSet CE_Caster = (Triggering unit)
      • Set VariableSet CE_Point = (Position of CE_Caster)
      • Set VariableSet CE_Level = (Level of (Ability being cast) for CE_Caster)
      • -------- -------- -------- --------
      • -------- -------- Create dummy unit to cast acid bomb: -------- --------
      • Unit - Create 1 Dummy (Explode) for (Owner of CE_Caster) at CE_Point facing Default building facing degrees
      • Set VariableSet CE_Dummy = (Last created unit)
      • Unit - Add [Dummy] Agonía tóxica to CE_Dummy
      • Unit - Set level of Agonía tóxica for CE_Dummy to CE_Level
      • Unit - Add a 10.00 second Generic expiration timer to CE_Dummy
      • -------- -------- -------- --------
      • -------- -------- Set area of effect and damage based on ability level: -------- --------
      • Set VariableSet CE_AoE = 350.00
      • Set VariableSet CE_Damage = 50.00
      • -------- -------- -------- --------
      • -------- -------- Deal damage and slow in the area of effect: -------- --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within CE_AoE of CE_Point.) and do (Actions)
        • Loop - Actions
          • Set VariableSet CE_Target = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (CE_Target is alive) Equal to True
              • (CE_Target belongs to an enemy of (Owner of CE_Caster).) Equal to True
              • (CE_Target is A structure) Equal to False
              • (CE_Target is Mechanical) Equal to False
            • Then - Actions
              • Unit - Order CE_Dummy to Neutral Alchemist - Acid Bomb CE_Target
              • Trigger - Run ExplodeDmgDelay <gen> (ignoring conditions)
            • Else - Actions
      • Custom script: call RemoveLocation(udg_CE_Point)
^ Try to only cast Acid Bomb on valid targets.

  • ExplodeDmgDelay
    • Events
    • Conditions
    • Actions
      • Custom script: local unit u = udg_CE_Caster
      • Custom script: local unit t = udg_CE_Target
      • Custom script: local real dmg = udg_CE_Damage
      • Wait 0.01 game-time seconds
      • Custom script: set udg_CE_Caster = u
      • Custom script: set udg_CE_Target = t
      • Custom script: set udg_CE_Damage = dmg
      • Unit - Cause CE_Caster to damage CE_Target, dealing CE_Damage damage of attack type Chaos and damage type Universal
      • Custom script: set u = null
      • Custom script: set t = null
^ This new trigger will delay the damage by a very short amount of time, allowing ExplodeOnDeath to finish running before anything dies.
 
Level 16
Joined
Dec 12, 2021
Messages
206
Hello man, thank you very much, I just saw it and I'm going to try it on my map, but I have one question: Should I use the same damage engine, or maybe you have one that is fixed so you can pass it on to me please? Well right now I'll make the arrangements on my map and let you know :)

EDIT: Bro, I just tried it, I followed all your steps and the modifications you made, I left the damage engine without modifying it, and even so, the lag continues to persist, I will leave you the map below so you can check it for yourself, yes Is there any way I can fix it, please could you help me bro? Maybe it is due to the damaged engine that requires some adjustment.
 

Attachments

  • (8)NuevaOrden_Alternativo.w3x
    3.6 MB · Views: 11
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,867
It's likely because you haven't fully configured the Damage Engine. Look at the picture in my last post. Two of the variables (with instructions) are not set.

Finish configuring the system properly and the issue should go away.
 
Last edited:
Top