• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!

[Spell] Add additional functionality to the Batrider's Unstable Concoction?

Status
Not open for further replies.
Level 4
Joined
Dec 1, 2008
Messages
48
I want to make the Batrider's Unstable Concoction ability cause the units damaged by it to also burn with damage over time, kind of like Drunken Haze + Breath of Fire effect, but only if the player has researched the Liquid Fire upgrade. How do I approach this problem?
 
Level 21
Joined
Mar 29, 2020
Messages
1,237
I didn't test it, but I think this should work.
  • Burning Bats
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Unstable Concoction
      • (Current research level of Liquid Fire for (Triggering player)) Equal to 1
    • Actions
      • Set VariableSet TempPoint = (Position of (Triggering unit))
      • Unit - Create 1 dummycaster for (Triggering player) at TempPoint facing Default building facing degrees
      • Set VariableSet Dummy = (Last created unit)
      • Unit - Add burn damage (Neutral Hostile) to Dummy
      • Set VariableSet BurnGroup = (Units within 200.00 of TempPoint matching ((((Matching unit) belongs to an ally of (Triggering player).) Equal to False) and (((Matching unit) is A flying unit) Equal to True)).)
      • Unit Group - Pick every unit in BurnGroup and do (Actions)
        • Loop - Actions
          • Unit - Order Dummy to Undead Necromancer - Unholy Frenzy (Picked unit)
      • Custom script: Custom script: call DestroyGroup(udg_BurnGroup)
      • Custom script: Custom script: call DestroyLocation(udg_TempPoint)
      • Unit - Remove Dummy from the game
the dummy's ability can be any cast-able ability that does damage over time, and then you have to give it to him and order him to cast it accordingly. I created an altered version of unholy frenzy where I nullified the attack boost so it only does damage. you would also have to create a custom buff with the right text and animation (so the unit would be on fire and not covered by the "unholy" cloud thingy).

the other thing you need to know is how to create a dummy unit the right way. check Uncle's explanation here: [Spell] - Making Forked Lightning a healing spell

the variables used were TempPoint = point, Dummy = unit, BurnGroup = unit group. pretty sure that covers all the bases.

good luck!
 
Level 4
Joined
Dec 1, 2008
Messages
48
I didn't test it, but I think this should work.
  • Burning Bats
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Unstable Concoction
      • (Current research level of Liquid Fire for (Triggering player)) Equal to 1
    • Actions
      • Set VariableSet TempPoint = (Position of (Triggering unit))
      • Unit - Create 1 dummycaster for (Triggering player) at TempPoint facing Default building facing degrees
      • Set VariableSet Dummy = (Last created unit)
      • Unit - Add burn damage (Neutral Hostile) to Dummy
      • Set VariableSet BurnGroup = (Units within 200.00 of TempPoint matching ((((Matching unit) belongs to an ally of (Triggering player).) Equal to False) and (((Matching unit) is A flying unit) Equal to True)).)
      • Unit Group - Pick every unit in BurnGroup and do (Actions)
        • Loop - Actions
          • Unit - Order Dummy to Undead Necromancer - Unholy Frenzy (Picked unit)
      • Custom script: Custom script: call DestroyGroup(udg_BurnGroup)
      • Custom script: Custom script: call DestroyLocation(udg_TempPoint)
      • Unit - Remove Dummy from the game
the dummy's ability can be any cast-able ability that does damage over time, and then you have to give it to him and order him to cast it accordingly. I created an altered version of unholy frenzy where I nullified the attack boost so it only does damage. you would also have to create a custom buff with the right text and animation (so the unit would be on fire and not covered by the "unholy" cloud thingy).

the other thing you need to know is how to create a dummy unit the right way. check Uncle's explanation here: [Spell] - Making Forked Lightning a healing spell

the variables used were TempPoint = point, Dummy = unit, BurnGroup = unit group. pretty sure that covers all the bases.

good luck!


DestroyLocation gives compile error. Also this doesn't work because the Dummy unit gets deleted immediately. If I disable the last action, the unit spawns but doesn't cast the ability.

I am also using a Necromancer as a dummy caster with Unholy Frenzy (Neutral Hostile). I removed all other abilities from him, set the custom spell (called Burn Damage) have a range of 1500, mana cost and cooldown of 0, but it still doesn't work.
 

Attachments

  • Batrider buff.w3m
    18.8 KB · Views: 16
Level 21
Joined
Mar 29, 2020
Messages
1,237
DestroyLocation gives compile error.
that's pretty standard stuff. maybe I typed it wrong. standard leak removal.

Edit: - my bad, it says "custom script:" twice in a row. erase one. for both of those...

the Dummy unit gets deleted immediately.
instead of removing the dummy like I did just give him a 1 second generic expiration timer.

I am also using a Necromancer as a dummy caster with Unholy Frenzy (Neutral Hostile). I removed all other abilities from him, set the custom spell (called Burn Damage) have a range of 1500, mana cost and cooldown of 0, but it still doesn't work.
"Also, did you base your Dummy unit off of the Locust unit? It's important that your Dummy Unit has the Locust ability and it's Art - Animation - Cast Backswing and Cast Point are set to 0.000 and it's Attacks enabled = None." from the link I attached earlier, but relevant here...
 
Level 4
Joined
Dec 1, 2008
Messages
48
that's pretty standard stuff. maybe I typed it wrong. standard leak removal.

Edit: - my bad, it says "custom script:" twice in a row. erase one. for both of those...


instead of removing the dummy like I did just give him a 1 second generic expiration timer.


"Also, did you base your Dummy unit off of the Locust unit? It's important that your Dummy Unit has the Locust ability and it's Art - Animation - Cast Backswing and Cast Point are set to 0.000 and it's Attacks enabled = None." from the link I attached earlier, but relevant here...
I am not calling custom script twice in a row like you first wrote it, that's not the problem.

I changed the custom unit to be the Locust but it seems there is a problem in the Loop Actions section.
Unit - Order Dummy to Undead Necromancer - Unholy Frenzy (Picked unit) causes the dummy to only cast the ability once on a single target from the ones that are picked in the burn group. I ran a test to see if there's more than 1 unit that gets added in the group and picked, by using a kill action, and it works. So the problem seems to be that the dummy doesn't want to cast the ability on more than 1 unit for some reason.
 

Uncle

Warcraft Moderator
Level 66
Joined
Aug 10, 2018
Messages
6,863
@Domcho
That's because your Dummy unit is either setup incorrectly or your Unholy Frenzy ability has a cooldown.

Make sure your Dummy unit's Movement Type is set to None and Speed Base is set to 0. If it's based on a Locust unit then that should be all that's needed. Don't forget to disable it's Attack as well.

Also, and I'm not 100% sure on this but I think Unholy Frenzy causes life loss rather than spell damage, meaning it's damage won't get mitigated by anything. If this is the case then you may be better off using another Damage Over Time ability like Acid Bomb (AoE set to 0 so it doesn't splash) or something like that.

If after all that it still doesn't work then you may also need to add a short Expiration Timer to the Dummy instead of manually removing it yourself.
 
Level 4
Joined
Dec 1, 2008
Messages
48
I reconfigured the dummy unit and it works now. Here is the trigger:

  • Unstable Concoction Burn
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Unstable Concoction
      • (Current research level of Liquid Fire for (Triggering player)) Equal to 1
    • Actions
      • Wait 0.50 seconds
      • Set VariableSet TempPoint = (Position of (Triggering unit))
      • Unit - Create 1 Dummy for (Owner of (Casting unit)) at TempPoint facing Default building facing degrees
      • Set VariableSet Dummy = (Last created unit)
      • Unit - Add Burn Damage (Neutral Hostile) to Dummy
      • Unit - Add a 1.00 second Generic expiration timer to Dummy
      • Set VariableSet BurnGroup = (Units within 600.00 of TempPoint.)
      • Unit Group - Pick every unit in BurnGroup and do (Actions)
        • Loop - Actions
          • Set VariableSet TempUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (TempUnit belongs to an ally of (Owner of (Casting unit)).) Equal to False
              • (Owner of TempUnit) Not equal to (Owner of (Casting unit))
              • (TempUnit is A flying unit) Equal to True
              • (TempUnit is alive) Equal to True
            • Then - Actions
              • Unit - Order Dummy to Undead Necromancer - Unholy Frenzy TempUnit
            • Else - Actions
      • Custom script: call DestroyGroup(udg_BurnGroup)
      • Custom script: call RemoveLocation(udg_TempPoint)
The proper command is RemoveLocation, not DestroyLocation. This is why it was giving me compile error.
There is/was a small problem - despite the "unit belongs to an ally of casting player = false" and "owner of targeted unit =/= owner of casting unit" if I have other batriders near the targeted unit they would also get the debuff for some reason. I guess it's because Unholy Frenzy can be cast on both enemy and friendly targets although the trigger specifically says that the dummy shouldn't cast it on friendly targets, it still does for some reason. So I went to the custom ability and set targets to "Air, Enemy, Mechanical and Organic" only. It seems to work now. There are a still a few issues I need to test and come up with a solution such as situations where the batrider enters his suicidal dive but doesn't finish it because his target died/teleported/became invulnerable. In such case I wouldn't want the dummy unit to cast the debuff to nearby air units.

As for the damage vs armor, I think I prefer it to ignore armor, but thanks for the tip, I might change it later to a different ability so it can take armor into account. I am attaching the file for anyone who wants to test it.
 

Attachments

  • Batrider buff.w3m
    19.9 KB · Views: 15

Uncle

Warcraft Moderator
Level 66
Joined
Aug 10, 2018
Messages
6,863
That Wait is going to cause you problems if you keep the trigger the way it is now.

Event Responses are like global variables, with the exception of Triggering Unit, meaning that they can only be set to 1 thing at a time. If another unit were to cast an ability during that 0.50 second Wait then it will become the Casting Unit and screw up your trigger.

Replace all instances of Casting Unit with Triggering Unit and you should be good.

Also, the casting player is considered an Ally as well so you don't need to check if Owner of Casting Unit == Owner of Picked Unit.
 
Last edited:
Level 4
Joined
Dec 1, 2008
Messages
48
That Wait is going to cause you problems if you keep the trigger the way it is now.

Event Responses are like global variables, with the exception of Triggering Unit, meaning that they can only be set to 1 thing at a time. If another unit were to cast an ability during that 0.50 second Wait then it will become the Casting Unit and screw up your trigger.

Replace all instances of Casting Unit with Triggering Unit and you should be good.

Also, the casting player is considered an Ally as well so you don't need to check if Owner of Casting Unit == Owner of Picked Unit.
Thank you. I changed it.
 
Status
Not open for further replies.
Top