Help! I want to make a trigger that banishes heroes, and causes flame-strikes beneath the ethereal target periodically

Level 4
Joined
Nov 16, 2019
Messages
55
So I am currently making a large dungeon crawl map, and I am currently designing a new enemy type; a ghost which banishes heroes and causes flame-strikes to erupt beneath them every second for 8 seconds.

This isn't a boss unit, so I don't want to make triggers for one specific unit either. It is going to be an enemy type that shows up several times throughout the map.

Currently I am capable of doing this when it is only one specific unit, however I do not know how to make this count for every unit of this type in the map. Also, I am having problems with making the unit cast banish on the heroes whenever the cooldown is refreshed.


If anyone has got a clue as to how to tackle this, it would be much appreciated.
Thanks.


*Additionally, I've also been wanting to make a "charm" ability, that only takes over a unit (heroes too) for 3-4 seconds rather than permanently, and then returns the unit to its rightful owner. I had a couple of attempts on making such a trigger, but ended up every time with just claiming the unit permanently. I'd much appreciate any input on this too.
 

Uncle

Warcraft Moderator
Level 48
Joined
Aug 10, 2018
Messages
4,697
So do you literally want the Flame Strike ability to cast underneath the banished hero? Or just periodic AoE damage that could be achieved through triggers?

Flame Strike has a delay so I'm guessing you want that incorporated?

Also, are you on the latest version of warcraft 3?
 
Last edited:
Level 4
Joined
Nov 16, 2019
Messages
55
So do you literally want the Flame Strike ability to cast underneath the banished hero? Or just periodic AoE damage that could be achieved through triggers?

Flame Strike has a delay so I'm guessing you want that incorporated?

Also, are you on the latest version of warcraft 3?

I want the Flame Strike cast underneath the banished hero. And yes, I'd like to have the casting delay inbetween each Flame Strike.

My version of WC3 is 1.31 I think. The last version before reforged came out.
 

Uncle

Warcraft Moderator
Level 48
Joined
Aug 10, 2018
Messages
4,697
Forgot to ask, what happens if a hero gets banished multiple times in a row?

By default the Banish buff would refresh, so the question is would the flame strikes restart as well? In other words, can the effect stack?

Also, a Charm ability that only lasts a few seconds and can target Heroes isn't too difficult to trigger but expect some serious potential for bugs. A lot of triggers/interactions can break due to this, especially since these are player owned Heroes that have triggers designed around.
 
Last edited:
Level 4
Joined
Nov 16, 2019
Messages
55
Forgot to ask, what happens if a hero gets banished multiple times in a row?

By default the Banish buff would refresh, so the question is would the flame strikes restart as well? In other words, can the effect stack?

I've set the banish cooldown to 12 seconds, and the duration to 9 seconds. The Flame Strikes should only spawn underneath the target while ethereal.

But in the case that there are 2 of these ghosts present, then they shouldn't both Banish the same target no. So the Banish should never target a hero that is already ethereal.
 

Uncle

Warcraft Moderator
Level 48
Joined
Aug 10, 2018
Messages
4,697
This requires a Unit Indexer (link in my signature).
Variables:
BanishPoint = Point
BanishGroup = Unit Group
BanishDummy = Unit
BanishDuration = Integer (Array)
BanishCV = Integer
  • Cast Banish
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Banish
    • Actions
      • Unit Group - Add (Target unit of ability being cast) to BanishGroup
      • -------- --------
      • Trigger - Turn on Banish Loop <gen>
      • -------- --------
      • -------- The Loop runs once every 0.25 seconds, subtracting 1 from BanishDuration each time. --------
      • -------- In order to calculate the BanishDuration variable, simply multiply the Banish abilities duration by 4 ---> 9*4 = 36. --------
      • Set VariableSet BanishCV = (Custom value of (Target unit of ability being cast))
      • Set VariableSet BanishDuration[BanishCV] = 36
  • Banish Loop
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in BanishGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Banish) Equal to True
            • Then - Actions
              • Set VariableSet BanishCV = (Custom value of (Picked unit))
              • -------- --------
              • -------- Subtract 1 from duration every 0.25 seconds: --------
              • Set VariableSet BanishDuration[BanishCV] = (BanishDuration[BanishCV] - 1)
              • -------- --------
              • -------- 1 second has passed, cast a flame strike: --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (BanishDuration[BanishCV] mod 4) Equal to 0
                • Then - Actions
                  • Set VariableSet BanishPoint = (Position of (Picked unit))
                  • Unit - Create 1 Dummy for Neutral Hostile at BanishPoint facing Default building facing degrees
                  • Set VariableSet BanishDummy = (Last created unit)
                  • Unit - Add a 5.00 second Generic expiration timer to BanishDummy
                  • Unit - Add Flame Strike to BanishDummy
                  • Unit - Order BanishDummy to Human Blood Mage - Flame Strike BanishPoint
                  • Custom script: call RemoveLocation (udg_BanishPoint)
                • Else - Actions
              • -------- --------
              • -------- Duration is over: --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • BanishDuration[BanishCV] Equal to 0
                • Then - Actions
                  • Unit Group - Remove (Picked unit) from BanishGroup.
                • Else - Actions
            • Else - Actions
              • Unit Group - Remove (Picked unit) from BanishGroup.
      • -------- --------
      • -------- Turn off this trigger while no units are banished: --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in BanishGroup) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions

You can modify this same design to create the temporary Charm ability as well. You'd need a Player (Array) variable to track the original owner of the Charmed unit, an Integer (Array) variable to track the duration of Charm, and a Unit Group to house these Charmed units. Let's call them CharmPlayer, CharmDuration, and CharmGroup. Then in your Charm Loop trigger you would periodically subtract 1 from the Picked unit's duration, check to see if it's Equal to 0, and if it is, change the Owner of the Picked unit back to CharmPlayer[CharmCV] and remove the Picked unit from the CharmGroup.

Furthermore, you'd no longer need the Flame Strike effect so you can delete that section from the trigger as well as the Buff stuff. You'd also want to avoid Charming an already Charmed unit, and thus losing reference to the original Owner. For example, ComputerA steals P1's hero, then ComputerB steals the same hero from ComputerA, thus resulting in P1 losing their hero forever since the new original owner would now be ComputerA. This may not be an issue if this type of thing can't happen in your map.

That being said, this Charm ability would probably cause tons of bugs and headaches. I don't recommend it, at least not for heroes.
 
Last edited:
Top