• 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] ... more fire trouble

Status
Not open for further replies.
Level 2
Joined
Jul 9, 2008
Messages
25
A burning effect is added to my units when "Flamethrower", an ability based on the Pandaren Brewmaster's Breath of Fire. But I am having trouble with the "Fire Extinguisher" spell used to put out a fire.

flamethrower
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Flamethrower
Actions
Unit - Add Burning to (Target unit of ability being cast)

It then spreads between units with this trigger:

fire spread
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) has buff Burning) Equal to True)) and do (Actions)
Loop - Actions
Unit - Add Burning to (Picked unit)
Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) has buff Burning) Equal to True) and ((Life of (Matching unit)) Less than or equal to 1.00))) and do (Actions)
Loop - Actions
Unit - Kill (Picked unit)

All that works fine, until I try to put the fire out. I have a spell to simulate a fire extinguisher, based on the Shaman's Purge spell:

fire extinguisher
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Fire Extinguisher
Actions
Unit - Remove Burning buff from (Target unit of ability being cast)
Unit - Remove Burning from (Target unit of ability being cast)

When the Fire Extinguisher spell is used on a unit that has been hit with a Flamethrower, it doesn't always work. If I use it within two or three seconds after the Flamethrower (while the Flamethrower spell is still casting), it will put out the fire just fine. But if I wait until after the Flamethrower has finished casting to begin casting the Fire Extinguisher, the Fire Extinguisher will remove the "Burning" ability from the unit, but not the buff, and one second later the Burning ability will come back and the unit will continue to take damage. Why isn't this working?
 
Level 10
Joined
Jan 28, 2009
Messages
442
Why do you need to use a buff? Just base Burning on any kind of passive item ability that gives a small damage/armor/Attribute bonus, remove the bonus ofc. Then use a trigger like this:

  • Burning - Leakfree
  • Events
    • Time - Every 1 seconds of the game
  • Conditions
  • Actions
    • Set tGroup = units in (playable map area) matching conditions (level of Ability (Burning) for matching unit is Greater than 0)
    • Unit Group - Pick every unit in tGroup and do actions
      • Loop
        • Unit - Set life of picked unit to (life of picked unit - (Burning damage)
        • Set tPoint = Position of picked unit
        • Set tGroup2 = units within (your radius) of tPoint
        • Custom script: call RemoveLocation(udg_tPoint)
        • Unit Group - Pick every unit in tGroup2 and do actions
          • Loop
            • Unit - Add ability Burning to picked unit
    • Custom script: call DestroyGroup(udg_tGroup)
    • Custom script: call DestroyGroup(udg_tGroup2)
Unit groups are leak badies...
 
Status
Not open for further replies.
Top