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

Triggering Damage Distrubution

Status
Not open for further replies.
Level 10
Joined
Mar 19, 2010
Messages
622
I'm trying to make a passive ability for an item to, when someone gets damaged, 10% of that amount of damage is redirected to the owner of that item. I'm using a damage engine. Below is the trigger i have.
  • IE Streayro Proc 1
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (GDD_DamagedUnit is in Heroes) Equal to True
    • Actions
      • Unit Group - Pick every unit in Heroes and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has an item of type |cffff8c00Streayro, the Blazing Brothehood) Equal to True
            • Then - Actions
              • Set SPS_D_Causer = GDD_DamageSource
              • Set SPS_D_Target = (Picked unit)
              • Set SPS_G_Event = 1
              • Set SPS_D_BaseDmg = (GDD_Damage x 0.10)
              • Set SPS_D_SpMultiplier = 0.00
              • Set SPS_D_Bonus1 = (Load 0 of (Key (Triggering unit)) from SPS_G_Hash)
              • Set SPS_D_Bonus2 = (Load 1 of (Key (Target unit of ability being cast)) from SPS_G_Hash)
              • Set SPS_D_AttType = Spells
              • Set SPS_D_DmgType = Normal
              • Trigger - Run SPS Event <gen> (ignoring conditions)
              • Set GDD_Damage = (GDD_Damage x 0.90)
            • Else - Actions
But now the problem is, it crashes my Warcraft 3 everytime someone gets damaged. Where is the leak? or is there any other ways of doing it?
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
That's not Damage Engine, it's Gui Friendly Damage Detection by Weep's. I'm not sure if I got it right, but I think you want some kind of "Thorns aura" that works on Melee and Ranged based on the item.

If you're running SPS Event, post that trigger too.

  • IE Streayro Proc 1
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (GDD_DamagedUnit is in Heroes) Equal to True
      • (GDD_DamagedUnit has item of type |cffff8c00Streayro, the Blazing Brothehood)
    • Actions
      • Trigger - Turn of (this trigger)
      • Unit - Cause GDD_DamagedUnit to deal (GDD_Damage x 0.10) to GDD_DamageSource.. blah blah.
      • Trigger - Turn on (this trigger)
It returns 10% of damage received to the damage source. it's leakless and MUI. If only heroes can hold items, you can remove the "Unit is in Heroes" condition, or use "Unit is a Hero == true" (Boolean)

It creashes because you're Triggering Damage, and that Damage triggers itself again, creating an endless loop. You can use Turn Off/On as I did in the example.
 
Level 10
Joined
Mar 19, 2010
Messages
622
Nope, I don't want a Thron Aura-like ability.

This item is a tank item and i want it to be protective to it's ally.

What this passive will do is, when ally recieve damage, they only takes 90% of it, the other 10% is transferred to the owner of the item. So he save his ally by take some of the damage they take.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Oooooooooooh... Is it a global effect or something? What's the range?

In this case, you should use Bribe's damage engine, since it allows detecting and manipulating damage. Weep's system doesn't.
 
Status
Not open for further replies.
Top