• 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.

Using Buff Tracking for Stat-based Damage

Status
Not open for further replies.
Level 19
Joined
Aug 8, 2007
Messages
2,765
  • Set Damage
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • Custom script: local unit u = udg_DamageEventSource
      • Set DamageEventAmountDummy = DamageEventAmount
      • Set Temp_Integer = (Player number of (Owner of DamageEventSource))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventTarget has buff MagicBolt) Equal to True
          • (Level of Magical Bolt for DamageEventSource) Not equal to 0
        • Then - Actions
          • Set DamageEventAmount = (DamageEventAmount + ((Real((Intelligence of DamageEventSource (Include bonuses)))) x 3.00))
          • Unit - Remove MagicBolt buff from DamageEventTarget
        • Else - Actions
      • -------- Show Critical Text --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventSource has buff ElectricMarker) Equal to True
          • (Level of Electricity for DamageEventSource) Not equal to 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ElectricityLastHit[Temp_Integer] Less than (CurrentGameTime + 3.00)
            • Then - Actions
              • Set ElectrictyHitCount[Temp_Integer] = 0.00
            • Else - Actions
          • Set ElectrictyHitCount[Temp_Integer] = (ElectrictyHitCount[Temp_Integer] + 1.00)
          • Set ElectricityLastHit[Temp_Integer] = CurrentGameTime
          • Set DamageEventAmount = (DamageEventAmount + ((Real((Intelligence of DamageEventSource (Include bonuses)))) x (3.00 x (Power(0.85, (ElectrictyHitCount[Temp_Integer] - 1.00))))))
          • Unit - Remove ElectricMarker buff from DamageEventTarget
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ShowCriticalText Equal to True
        • Then - Actions
          • Set ShowCriticalText = False
          • Floating Text - Create floating text that reads ((String((Integer(DamageEventAmount)))) + !) above DamageEventTarget with Z offset 50.00, using font size 13.00, color (100.00%, 5.00%, 10.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 75.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 3.50 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 1.40 seconds
        • Else - Actions
heres what i currently have. The problem is that magical bolt and electricity wont get the additional damage. If i put a debug after the set DamagEeventAmount, than it wont show. Can anyone see what im doing wrong? Am i doing it right and its an issue with applying the buff?
 
Status
Not open for further replies.
Top