• 🏆 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!

Whats wrong with this trigger?

Status
Not open for further replies.
Level 4
Joined
Apr 15, 2016
Messages
60
  • SR By Bite
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (GDD_DamagedUnit has buff Venom (Non-stacking)) Equal to True
      • (GDD_DamagedUnit has buff Venom (Stacking)) Equal to True
    • Actions
      • Set BBLEEDMaxIndex = (BBLEEDMaxIndex + 1)
      • Set BBLEEDKiller[BBLEEDMaxIndex] = GDD_DamageSource
      • Set BBLEEDDying[BBLEEDMaxIndex] = GDD_DamagedUnit
      • Set BBLEEDPeriod[BBLEEDMaxIndex] = 0.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BBLEEDMaxIndex Equal to 1
        • Then - Actions
          • Trigger - Turn on SR By Bite Period <gen>
        • Else - Actions
  • SR By Bite Period
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • For each (Integer BBLEEDCurrentIndex) from 1 to BBLEEDMaxIndex, do (Actions)
        • Loop - Actions
          • Set BBLEEDPeriod[BBLEEDCurrentIndex] = (BBLEEDPeriod[BBLEEDCurrentIndex] + 0.02)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • BBLEEDPeriod[BBLEEDCurrentIndex] Greater than or equal to 10.00
            • Then - Actions
              • Set BBLEEDKiller[BBLEEDCurrentIndex] = BBLEEDKiller[BBLEEDMaxIndex]
              • Set BBLEEDDying[BBLEEDCurrentIndex] = BBLEEDDying[BBLEEDMaxIndex]
              • Set BBLEEDMaxIndex = (BBLEEDMaxIndex - 1)
              • Set BBLEEDCurrentIndex = (BBLEEDCurrentIndex - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • BBLEEDMaxIndex Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
              • Unit - Cause BBLEEDKiller[BBLEEDCurrentIndex] to damage BBLEEDDying[BBLEEDCurrentIndex], dealing (10.00 x 0.02) damage of attack type Spells and damage type Normal
SMALL NOTE: The event GDD_Event unit can be swaped by "Unit Dies" as the targeted unit (the damagED one) dies for 1 HIT. My purpose ? To make the unit take 10x0.02 damage per second EVEN AFTER IT DIES (but of course, if it had the Debuffs Venom Stacking or Venom non stacking)
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
Units that die have all their buffs removed, so your conditions will always return false. I don't understand why you would even want to deal damage to a dead unit, but for whatever reason you have, I recommend adding units that have the "Venom" buff into a unit group, and then just using that as a condition rather than checking if they have the buff.
 
Level 4
Joined
Apr 15, 2016
Messages
60
They respawn, I forgot to say this. I used the term "after death". SOrry.

How to do the unit group trick ?

EDIT: And I forgot to say that the Venom buff is removed because it is base ability for an Enchant Totem (from dota) which empowers the attack for 1 hit. The venom buff is there to DETECT this one hit.

Basically I want to deal damage per second for 10 seconds to a unit when it dies for the Enchant Totem caster (if he has actived it) even after it respawns. The caster has also a buff, which is removed when he hits the target.

Enchant Totem Description:

Empowers the totem resting on Raigor's back, causing it to deal extra damage on the next attack.
 
Status
Not open for further replies.
Top