• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Making an absorb system

Status
Not open for further replies.
Level 31
Joined
Jul 23, 2009
Messages
1,032
I need help making an absorb system and Im not familliar at all with jass

I want to make a spell that blocks up to a certain amount of damage from the next damage source

I use the Gdd gui friendly damage detection system (think thats the name) and I belive its possible to use this for the system I want.

Any help is appreciated and reputation shall be given!
 
A damage detection system (like most events) actually fires before the damage occurs...

That's not true, actually an attack event fires before damage occurs, but DD on the other hand fires 'when' damage occurs...

The problem with DD systems is that it will damage you first before the event takes place, say if you have 10HP left, and
you already have a damage blockade, then your unit will die in that manner...

Imo, it's better to blockade the damage dealt with a timer (set your life at constant) or on every attack (although it's abusable in many cases)...
 
That's not true, actually an attack event fires before damage occurs, but DD on the other hand fires 'when' damage occurs...

The problem with DD systems is that it will damage you first before the event takes place, say if you have 10HP left, and
you already have a damage blockade, then your unit will die in that manner...

Imo, it's better to blockade the damage dealt with a timer (set your life at constant) or on every attack (although it's abusable in many cases)...
I'm not sure how to say this nicely, but: this is wrong, and please don't contradict people with much more experience than you modding wc3 without at least testing your claims first.

Here is a map which disproves your claim:
 

Attachments

try to reduce the HP of your footman to less than the damage dealt, it will fire before the Laster code...
That's the point. Last (the action for the on-damaged event) fires before damage is dealt, but Laster (a 0-second timer later) fires after it's dealt, so you would add HP+maxHP in Last and remove it in Laster, an instantaneous amount of time in the eyes of the player but long enough to capture otherwise lethal damage.
 
Thx for the replies but I still can't get this together :/

I want to make an ability that gives you a 100 hp shield for the next damage source only and then vanish. I have tried Bribe's Damage engine but I don't really know how to do because the amount isn't accurate and sometimes he even gets healed by the block somehow.

Edit: I remade the trigger and now it seems to work fine but somehow it feels wrong that it was this simple.
  • Block
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • DamageEventTarget Equal to (==) Archmage 0006 <gen>
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DamageEventPrevAmt Less than (<) 100.00
        • Then - Actions
          • Set DamageEventAmount = 0.00
        • Else - Actions
          • Set DamageEventAmount = (DamageEventPrevAmt - 100.00)
Does it look okay? He sucessfully take no dmg if the damage dealt is less than or equal to 100
 
Last edited:
Status
Not open for further replies.
Back
Top