• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Spell] Special Towers/Coded Lifesteal

Status
Not open for further replies.
Level 6
Joined
Jul 23, 2018
Messages
243
Hello everyone,
1) So I have searched various of threads but still couldn't find a way to make a splash fire spell based on orb of fire on the tower artillery. The thing here is that there is a small delay after the tower artillery hit the ground. But I don't know how to do that, especially when the range varies.
2) Another thing is that how do I get "Unit cause damage..." action to work with lifesteal?
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,457
1) Not too sure what you're asking for so let me know which one of these it is (if any):
A: You want a Tower to apply the Orb of Fire buff to enemies it hits with it's splash attack.
B: You want to make a spell that fires a missile which deals area of effect damage when it reaches it's destination.

2) This isn't something you can do easily but here's how I'd do it:
  • Import Bribe's Damage Engine into your map.
  • Track a unit's Lifesteal using a Real variable array and a Unit Indexer (again, I recommend Bribes system) OR you can rely on a Hashtable. This part can be tricky since Lifesteal can come from many different sources (items, abilities, buffs). Auras are especially tricky like Vampiric Aura.
  • Using the Damage Engine, create a new DamageEvent trigger that detects when Coded damage (Unit cause damage...) is dealt and in this trigger Heal the damage source. Use either the Lifesteal array or Hashtable (depending on which method you choose to use) to get a reference to the unit's total Lifesteal %.
  • The math here is pretty simple: Set Life of DamageEventSource = Life of DamageEventSource + (DamageEventAmount * Lifesteal). This is assuming that you designed Lifesteal to be a Real where 0.01 = 1%.
  • You may want to add other Conditions to this trigger to prevent Spell damage from healing the damage source since Lifesteal is normally only used by Attacks.
 
Last edited:
Level 6
Joined
Jul 23, 2018
Messages
243
1) Not too sure what you're asking for so let me know which one of these it is (if any):
A: You want a Tower to apply the Orb of Fire buff to enemies it hits with it's splash attack.
B: You want to make a spell that fires a missile which deals area of effect damage when it reaches it's destination.

2) This isn't something you can do easily but here's how I'd do it:
  • Import Bribe's Damage Engine into your map.
  • Track a unit's Lifesteal using a Real variable array and a Unit Indexer (again, I recommend Bribes system) OR you can rely on a Hashtable. This part can be tricky since Lifesteal can come from many different sources (items, abilities, buffs). Auras are especially tricky like Vampiric Aura.
  • Using the Damage Engine, create a new DamageEvent trigger that detects when Coded damage (Unit cause damage...) is dealt and in this trigger Heal the damage source. Use either the Lifesteal array or Hashtable (depending on which method you choose to use) to get a reference to the unit's total Lifesteal %.
  • The math here is pretty simple: Set Life of DamageEventSource = Life of DamageEventSource + (DamageEventAmount * Lifesteal). This is assuming that you designed Lifesteal to be a Real where 0.01 = 1%.
  • You may want to add other Conditions to this trigger to prevent Spell damage from healing the damage source since Lifesteal is normally only used by Attacks.
1) I meant B with a delay and smaller explosion around the big one
2) But I thought the only damage apply here is only from attack?
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,457
1) I meant B with a delay and smaller explosion around the big one
2) But I thought the only damage apply here is only from attack?
1) If there's a Missile involved then there's a delay. That's the idea of a Missile, it has Speed, Arc, etc. But I'm still not entirely sure what you want because you described exactly what an Artillery attack is. The Mortar Team for example fires a Missile which travels at a given speed (delay) and deals splash damage in a radius (has small/medium/large dmg depending on distance from center of explosion), why doesn't this work for you? Maybe try comparing it to a spell from another game (DotA/League).

2) Coded damage doesn't benefit from Orb effects like Lifesteal, Critical Strike, Bash, etc... Since it's Coded and not an Attack using a Weapon you have to trigger the Orb effects yourself. A detailed breakdown of Damage/Attack Types: REPO in progress - mapping damage types to their abilities
 
Last edited:
Level 6
Joined
Jul 23, 2018
Messages
243
1) If there's a Missile involved then there's a delay. That's the idea of a Missile, it has Speed, Arc, etc. But I'm still not entirely sure what you want because you described exactly what an Artillery attack is. The Mortar Team for example fires a Missile which travels at a given speed (delay) and deals splash damage in a radius (has small/medium/large dmg depending on distance from center of explosion), why doesn't this work for you? Maybe try comparing it to a spell from another game (DotA/League).

2) Coded damage doesn't benefit from Orb effects like Lifesteal, Critical Strike, Bash, etc... Since it's Coded and not an Attack using a Weapon you have to trigger the Orb effects yourself. A detailed breakdown of Damage/Attack Types: REPO in progress - mapping damage types to their abilities
1) Take Dragon form Shyvana Q in for example. What I mean is a splash aoe attack like mortar team, meat wargon, and etc. and then use Flame Strike spell to leave a burning aoe effect after the missile from the attacker lands. Except it is activated upon missile hit.
2) If so, then what are the possible conditions filter?
 
Last edited:

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,457
1) Take Dragon form Shyvana Q in for example. What I mean is a splash aoe attack like mortar team, meat wargon, and etc. and then use Flame Strike spell to leave a burning aoe effect after the missile from the attacker lands.
2) If so, then what are the possible conditions filter?
1) This sounds a lot like Burning Oil for the Demolisher. But if you literally want Flame Strike to cast then you can do this:
  • Copy and paste the Disease Cloud (Meat Wagon) ability.
  • Copy and paste the Disease Cloud unit but remove the extra stuff from it like the damage over time ability (Plague Ward) and hide it's model. It should act like a Locust unit which can't be selected/targeted, so you probably have to give it the Locust ability. If you already have a Dummy unit in your map then you should just use that instead.
  • Copy and paste the Flame Strike ability. Set it up so a Dummy unit can cast it -> No mana cost, 999999 Cast Range, etc.
  • Now that everything in the Object Editor is created, edit your new Disease Cloud ability so that it uses the new Disease Cloud unit as it's Ward Unit Type. Then give your Disease Cloud unit your Flame Strike ability.
  • Create a trigger that detects when A unit enters playable map area. Add a Condition to check if the Unit-type of that unit is your new Disease Cloud unit. Add an Action to order the (Entering unit) to cast Flame Strike at it's Position. There may be a delay if you haven't setup the Dummy + Flame Strike ability properly.

2) You'll be using Bribe's Damage Engine which comes with all sorts of Variables. These variables act like Events/Event Responses. If you want to check what type the damage was you can use these Booleans: IsDamageSpell, IsDamageCode, IsDamageAttack, IsDamageMelee, IsDamageRanged.
  • Events
  • Game - DamageEvent becomes Equal to 1.00
  • Conditions
  • IsDamageCode Equal to True
  • IsDamageAttack Equal to True
  • Actions
  • Set Variable CV = Custom value of DamageEventSource
  • Unit - Set life of DamageEventSource to (Life of DamageEventSource + (DamageEventAmount * Lifesteal[CV]))
  • /// NOTE: this is using the Unit Indexer method ///
Lifesteal is a Real array variable. It would be set beforehand and track each unit's Lifesteal amount. A Lifesteal value of 0.40 would be equal to 40% lifesteal.

You can see examples of how to use the Damage Engine system and read more about it on the test map it comes with.
 
Last edited:
Level 6
Joined
Jul 23, 2018
Messages
243
1) This sounds a lot like Burning Oil for the Demolisher. But if you literally want Flame Strike to cast then you can do this:
  • Copy and paste the Disease Cloud (Meat Wagon) ability.
  • Copy and paste the Disease Cloud unit but remove the extra stuff from it like the damage over time ability (Plague Ward) and hide it's model. It should act like a Locust unit which can't be selected/targeted, so you probably have to give it the Locust ability. If you already have a Dummy unit in your map then you should just use that instead.
  • Copy and paste the Flame Strike ability. Set it up so a Dummy unit can cast it -> No mana cost, 999999 Cast Range, etc.
  • Now that everything in the Object Editor is created, edit your new Disease Cloud ability so that it uses the new Disease Cloud unit as it's Ward Unit Type. Then give your Disease Cloud unit your Flame Strike ability.
  • Create a trigger that detects when A unit enters playable map area. Add a Condition to check if the Unit-type of that unit is your new Disease Cloud unit. Add an Action to order the (Entering unit) to cast Flame Strike at it's Position. There may be a delay if you haven't setup the Dummy + Flame Strike ability properly.

2) You'll be using Bribe's Damage Engine which comes with all sorts of Variables. These variables act like Events/Event Responses. If you want to check what type the damage was you can use these Booleans: IsDamageSpell, IsDamageCode, IsDamageAttack, IsDamageMelee, IsDamageRanged.
  • Events
  • Game - DamageEvent becomes Equal to 1.00
  • Conditions
  • IsDamageCode Equal to True
  • IsDamageAttack Equal to True
  • Actions
  • Set Variable CV = Custom value of DamageEventSource
  • Unit - Set life of DamageEventSource to (Life of DamageEventSource + (DamageEventAmount * Lifesteal[CV]))
  • /// NOTE: this is using the Unit Indexer method ///
Lifesteal is a Real array variable. It would be set beforehand and track each unit's Lifesteal amount. A Lifesteal value of 0.40 would be equal to 40% lifesteal.

You can see examples of how to use the Damage Engine system and read more about it on the test map it comes with.
1) Thank you, but does this mean I have to create multiple Disease Cloud units and abilities for different towers?
2) Thank you
I guess this part is solved now
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,457
1)
If you want the different towers to cast different abilities when their attack lands, then yes. However, it's possible that the Disease Cloud ability is considered a "Summoning" ability and can use the "A unit spawns a Summoned unit" Event. If this works then you wouldn't need a different Disease Cloud unit since you could just check the Unit-type of the (Summoning unit).

I'll be honest I'm still not entirely sure what you're trying to achieve. As far as I can tell Shyvana's (Q) from League of Legends is just Cleaving Attack but for one attack. How is an Artillery attack like the Demolishers any different? And why doesn't Burning Oil work as the damage over time effect?
 
Last edited:
Level 6
Joined
Jul 23, 2018
Messages
243
1) Because I want smaller explosion around the middle, big explosion
I want Flame Strike because of its Birth animation
As I stated before, I wanted a delay, Burning Oil doesn't have a delay as far as I called.
and I mean Shyvana (Q) in dragon form which her Q changed during the duration of her R
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,457
Alright, I think what I suggested with the Disease Cloud should do what you need.

The only question I have left is: If the Attack hits 10 enemies, does it cast 1 Flame Strike or 10 Flame Strikes? I assume you only want 1 Flame Strike per attack, which is how it will work as of now.
 
Level 6
Joined
Jul 23, 2018
Messages
243
I only need it cast to cast once, but if multiple time, do I use for each integer loop?
I was mistaken when referring Dragon Form Shyvana Q, I meant E not Q
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,457
I only need it cast to cast once, but if multiple time, do I use for each integer loop?
I was mistaken when referring Dragon Form Shyvana Q, I meant E not Q
Yes, you can use a For Loop (integer loop):
From 1 to 10 do -> Create dummy -> Order dummy to cast Flame Strike

Or Pick every Unit and get nearby enemy units. This is basically the same as a For Loop but would run once for each enemy.
 
Level 6
Joined
Jul 23, 2018
Messages
243
Yes, you can use a For Loop (integer loop):
From 1 to 10 do -> Create dummy -> Order dummy to cast Flame Strike

Or Pick every Unit and get nearby enemy units. This is basically the same as a For Loop but would run once for each enemy.
Is it like this?
Also, there appears to be a small delay, which is what I wanted, but I want to get access to all possible fields, so may I ask you how do I remove this delay?
  • Flame Tower
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • (Unit-type of (Summoning unit)) Equal to Advanced Flame Tower
    • Actions
      • Unit - Add Flame Strike (Tower Effect) to (Summoned unit)
      • Unit Group - Pick every unit in (Units within 300.00 of (Position of (Summoned unit)) matching (((Owner of (Picked unit)) is an enemy of (Owner of (Summoned unit))) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Order (Summoned unit) to Human Blood Mage - Flame Strike (Position of (Picked unit))
P.S: I'll clean up the leaks later
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,457
Units by default have a delay before they cast spells and any ability with Casting Time will have a delay in addition to that.

So the Dummy Unit needs to be setup properly:
Speed Base: 0
Movement Type: None --- This allows the Dummy to cast spells without needing to face it's target.
Art - Cast Point/Cast Backswing: 0.00 --- This is the default delay.

Then change Flame Strike's Casting Time if you want.

The Dummy won't be able to cast Flame Strike (or any ability) on each Picked unit if there's ANY delay > 0. That's why I suggested creating new Dummy units to cast it.
 
Level 6
Joined
Jul 23, 2018
Messages
243
Right after I switched to creating a new Dummy unit based on disease cloud, the unit doesn't cast anymore
Before that, I checked everything but there is still a small delay
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,457
As long as the Dummy unit is setup properly like I described you shouldn't have issues. Remember, the Dummy unit needs to actually have the ability in order to cast it. That and the Dummy must meet any ability requirements -> Mana cost, cast range, requirements.

I would copy and paste the Locust unit and apply the settings I described above. That'll be a perfectly working Dummy.

When you say delay do you mean Casting Time or? Because Flame Strike is meant to have a delay.
 
Last edited:

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,457
so there is no possible way to remove flame strike delay? because it is hard-coded?

I don't know the specifics but that should help answer some questions.

You can always use Burning Oil if you don't want the delay. If it's only the Special Effect you're after then you can trigger that.
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,457
I don't think the Summoned Event works. At least I couldn't get it to work.

I think you need to use the "A unit enters map" Event.
 

Attachments

  • Artillery Flame Strike.w3m
    18.2 KB · Views: 8
Level 6
Joined
Jul 23, 2018
Messages
243
I think there was a bug where the Summoned Event work, at least before I saved.
Also, I don't have WE Reforged so I cannot open the map
 

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,457
Well, only this works for me:
  • Example 1
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Dummy (Disease Cloud)
    • Actions
      • Set VariableSet TempPoint = (Position of (Triggering unit))
      • Unit - Add Flame Strike (Dummy) to (Triggering unit)
      • Unit - Order (Triggering unit) to Human Blood Mage - Flame Strike TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
  • Example 2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Dummy (Disease Cloud)
    • Actions
      • Set VariableSet TempPoint = (Position of (Triggering unit))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 300.00 of TempPoint.) 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) belongs to an enemy of (Owner of (Triggering unit)).) Equal to True
            • Then - Actions
              • Set VariableSet TempPoint2 = (Position of (Picked unit))
              • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at TempPoint2 facing Default building facing degrees
              • Unit - Add Flame Strike (Dummy) to (Last created unit)
              • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
              • Unit - Order (Last created unit) to Human Blood Mage - Flame Strike TempPoint2
              • Custom script: call RemoveLocation(udg_TempPoint2)
            • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
 
Level 6
Joined
Jul 23, 2018
Messages
243
Oh well, Thanks a lot for helping me with everything, would've given you a lot of reputation but the option no longer exists in this new Hive
I guess there is no other choice than to create a lot of dummies
Edit:
  • Flame Tower
    • Events
      • Unit - A unit enters (Entire map)
    • Conditions
      • (Unit-type of (Entering unit)) Equal to Tower Dummy (Flame)
    • Actions
      • Set CV = (Custom value of (Entering unit))
      • Set TempPoint[CV] = (Position of (Entering unit))
      • Unit - Order (Entering unit) to Human Blood Mage - Flame Strike TempPoint[CV]
      • Custom script: call RemoveLocation(udg_TempPoint[udg_CV])
      • For each (Integer A) from 1 to 7, do (Actions)
        • Loop - Actions
          • Set Degree = (Degree + 51.42)
          • Set TempPoint[CV] = ((Position of (Entering unit)) offset by 300.00 towards Degree degrees)
          • Unit - Create 7 Tower Dummy (Flame) for (Owner of (Entering unit)) at TempPoint[CV] facing Default building facing degrees
          • Unit - Remove Flame Strike (Tower Effect) from (Last created unit)
          • Unit - Add Flame Strike (Tower Effect) (Delay to (Last created unit)
          • Unit - Order (Last created unit) to Human Blood Mage - Flame Strike TempPoint[CV]
          • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation(udg_TempPoint[udg_CV])
Somehow the created dummies aren't dying?
Edit 2: So I wanted to make waves, how do I do that?
 
Last edited:
Status
Not open for further replies.
Top