Searing Arrows not bonus damage

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
You trigger that yourself - the Weep's GDD just provides a much more efficient way to damage detection, that's all. In this case, you could use the Item Health Bonus bug in some way.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
When you add an Item Life Bonus-based ability to a unit, increase its level and remove it again, the unit's life is reduced by the increased level value, but the amount that was added to it doesn't change. This causes the unit to have reduced maximum health.

For example: I have a Life Bonus ability. Level 1 has 100 hp increase, Level 2 has 250 and Level 3 has 400. I add it to a unit, its life increases by 100 to become x+100. Then, I increase its level to 2. This doesn't change the maximum health, and the unit's health stays at x+100. Then I remove the ability. This reduces the unit's maximum health by 250 (Level 2 value), leaving it with x-150 max hp.

You could just set the unit's life to Life of Damaged Unit + Damage Taken, or cause the unit to deal negative damage to itself. Though I'm not sure if any of those work, but you might as well try them out.
 

Curo

Why am I still playing this game...?
Reaction score
109
So first you want to grab a damage detection system from these forums. You need this because there is no "A unit takes damage" event. The system creates an event for every unit in the map, effectively giving you that event.

ALL triggers that you want to run when damage is dealt must be placed in the main damage detection trigger. In this trigger, triggering unit will be the unit that takes damage, and damage source will be the unit that deals damage. Basically, you need to create an if-then statement for each mini-trigger within the damage detection trigger. So, you would have "If triggering unit has buff frost arrows, then...".

Also to note, in the object editor, your "frost arrows" buff needs to have like 0.01 sec duration. And make it a custom buff, not actual frost arrows...otherwise it would interfere with real Frost Arrows (if you use them).

The then part will consist of setting the hp of the unit to (current hp + damage taken). The actual damage would not be dealt until after this trigger runs, so this effectively negates the original attack damage. Next, in the then part, you want to do your triggered damage to the unit.

And that's "roughly" how a damage detection system works, and how you can customize it to your needs.
 

HydraRancher

Truth begins in lies
Reaction score
197
So first you want to grab a damage detection system from these forums. You need this because there is no "A unit takes damage" event. The system creates an event for every unit in the map, effectively giving you that event.

ALL triggers that you want to run when damage is dealt must be placed in the main damage detection trigger. In this trigger, triggering unit will be the unit that takes damage, and damage source will be the unit that deals damage. Basically, you need to create an if-then statement for each mini-trigger within the damage detection trigger. So, you would have "If triggering unit has buff frost arrows, then...".

Also to note, in the object editor, your "frost arrows" buff needs to have like 0.01 sec duration. And make it a custom buff, not actual frost arrows...otherwise it would interfere with real Frost Arrows (if you use them).

The then part will consist of setting the hp of the unit to (current hp + damage taken). The actual damage would not be dealt until after this trigger runs, so this effectively negates the original attack damage. Next, in the then part, you want to do your triggered damage to the unit.

And that's "roughly" how a damage detection system works, and how you can customize it to your needs.

Correct, however I believe it does not negate the damage if the unit is close to max life.
 

Arberden

Active Member
Reaction score
0
Kaerf - So i use the Item health bug to damage them? but what if the units inventory is full.
Curo - what if their life is so low that a normal hit kill them before the then part can heal the unit back?
 

HydraRancher

Truth begins in lies
Reaction score
197
Kaerf - So i use the Item health bug to damage them? but what if the units inventory is full.
Curo - what if their life is so low that a normal hit kill them before the then part can heal the unit back?

Item Health bug is for max hp. Also, you can't see it as a visible item. -.-

@Second Statement

If you actually read what Curo said, then there is a small glitch that when damage is applied, you can add HP back before it is, succesfully negating the effect.
 

Arberden

Active Member
Reaction score
0
But if the inventory is full the unit will not even pick up the item right?
and for curo if the unit is at full hp and it heals nothing then damages.
 

HydraRancher

Truth begins in lies
Reaction score
197
1. It's an ability not an item. The point is you can abuse it to increase max hp, which you DONT need.

2. Yes, that's exactly what I said 3 posts ago.
 

Arberden

Active Member
Reaction score
0
Ok thanks i understand now.
But for Curo is it possible to like check if hero is above 50% hp then wait 0.01 before healing so he will get damaged first and if it is below 50% just heal straight away?
 

HydraRancher

Truth begins in lies
Reaction score
197
I remember there was a better method for cancelling damage. Look up some DDS on this website, they may have that function.
 

Curo

Why am I still playing this game...?
Reaction score
109
Ok thanks i understand now.
But for Curo is it possible to like check if hero is above 50% hp then wait 0.01 before healing so he will get damaged first and if it is below 50% just heal straight away?

You've got the gist of it. You can actually wait 0.00 sec by use of a timer. Here's the trigger for it. And it's more accurate than just looking for 50%. First, make a dummy ability (based off the item health bonus) that gives like +one million hp.

Trigger:
  • damage detection
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Triggering unit) has buff Frost Arrows equal to True
      • Then - Actions
        • Set current_health = (Life of (Triggering unit))
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (current_health + (Damage taken)) Less than (Max life of (Triggering unit))
          • Then - Actions
            • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + (Damage taken))
          • Else - Actions
            • Unit - Add Health +1mil (generic) to (Triggering unit)
            • Set damaged_unit = (Triggering unit)
            • Countdown Timer - Start damage_timer as a One-shot timer that will expire in 0.00 seconds
      • Else - Actions

Trigger:
  • damage timer
    • Events
      • Time - damage_timer expires
    • Conditions
    • Actions
      • Unit - Remove Health +1mil (generic) from damaged_unit
      • Unit - Set life of damaged_unit to (current_health - damage)


Where damage is whatever damage you want to deal to it. If you want to deal actual damage that is affected by armour value and type, you'll have to, instead of setting the life:
- turn the damage detection trigger off
- deal the damage
- turn it back on
 

HydraRancher

Truth begins in lies
Reaction score
197
Because WC3 has a hardcoded minimum wait time, so using a timer is the only way to get a 0.00 second wait, unfortunately.

Oh of course sorry, the 0.27 second wait I believe? I forgot about that.

You forgot to add the life didn't you? After you add the +1 million life bonus abillity, you still need to add the life.
 

Curo

Why am I still playing this game...?
Reaction score
109
Oh of course sorry, the 0.27 second wait I believe? I forgot about that.

You forgot to add the life didn't you? After you add the +1 million life bonus abillity, you still need to add the life.

Don't need to add life. The current health is saved in a variable. The +1 million is added to prevent the unit from dieing (if the damage is really high). Then we just remove the health bonus ability, then set the appropriate health amount by using the current health variable that we stored earlier.

So say you have 80/100 hp, and 40 damage is dealt. The ability will make it 800,000/1,000,000 health, then we have the "timer-wait", and you take the damage. You are now at 799,960/1,000,000 health. The ability is removed, putting you back to 79.996/100, and the saved variable kicks in, making it exactly 80/100.

The whole reason we add the health ability is because if the damage were to be 80 or more, the unit would die, and we don't want that.
 
General chit-chat
Help Users

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top