Damage absorb spell

reuu

Member
Reaction score
0
hey guys just a quick question, wondering how i make a damage absorb shield spell. Like power word shield or lord avenerus's spell from dota[without the damage offload].

I can only seem to find spell damage absorb. based on the banshee's spell.
Is there any physical/all damage absorb spell i can base it off? or is there a trigger i should use?
 

FireBladesX

Eating my wings!
Reaction score
123
You use a trigger with the specific unit event, Unit takes damage. However, it's best to use another trigger to set up the event.

The easiest way to do this is when a unit learns the desired ability, do Trigger - add event to Absorption Trigger <gen> the event (Triggering Unit takes damage), then turn off the learning trigger.

The second trigger, which you added the event that your hero takes damage, will heal your hero equal to (Damage taken), and set a real variable (shieldlife) to (shieldlife - Damage taken). When shieldlife reaches 0, run whatever actions and turn off the damage trigger.

A third trigger sets the shieldlife variable to your desired damage cap upon casting.
 

Rx13

New Member
Reaction score
0
I am having the same question.

i am new to triggers and stuff , but I really want to make this map and need this spell , I used these triggers and it didn't work.

Trigger 1(Absorb damage learn)
Event
Unit - A unit Learns a Skill
Conditions
(Unit-type of (Triggering unit)) Equal to Priest
(Learned Hero Skill) Equal to Shield
Actions
Set ShieldAbsorbMax = ((Real((Learned skill level)))*500)


==================

Trigger 2(Absorb Damage Cast)
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Shield
Actions
Set ShieldAbsorb=ShieldAbsorbMax
Set shieldTarget=(Target unit of ability being cast)


===================

Trigger 3(Absorb Damage)
Event
Unit - A unit is attacked
Conditions
(Triggering unit) Equal to Shieldtarget
Actions
If (all conditions are True) then do (Then Actions) else do (Else Actions)
If Conditions
Shieldabsorb > 0
Then - Actions
Set Shieldabsorb = (Shieldabsorb - (Damage taken))
Unit - Set life of ShieldTarget to ((Life of ShieldTarget) + ( Damage Taken))
Else - Actions

===================
1.I used some text to show shieldabsorb amount after beinng hit and have ability cast on target . it always shows the max amount and doesnt decrease.

2.the target doesnt heal after being hit.

3.I dont know how to end the ability on target , like dispeling it.

4.and I just have it cast on 1 target at a time and just one hero of this kind.

5.I am sure it leaks , so please let me know.
 

Smitty

Member
Reaction score
20
You need a damage detection system.
Also, your first trigger is unnecessary, you can set the variable to 500 in the custom variable window.
Add a wait to the end of the 'ability is cast' trigger, and at the end of the wait, turn off the 3rd trigger. Just remember to turn it on at the start.
 

Rx13

New Member
Reaction score
0
Thanks for the wait , turning on and off part. I didnt get what you mean by damage detection system . can you help on that a bit ?
 

TzalDadok

New Member
Reaction score
2
This is awesome, first time im going to help, this feels good :D

1) Create a spell based of Channel, with Unit target and to do nothing.
2) Create Buff.
3) I made another dummy spell based of Howl of Terror that does nothing but with Buff I created.
4) Triggers.

I don't know if they are perfect but they work :D

Trigger:
  • Power Shield
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Power Shield
    • Actions
      • Set PowerShield_Caster = (Casting unit)
      • Set PowerShield_Target = (Target unit of ability being cast)
      • Unit - Create 1 Dummy for (Owner of (PowerShield_Caster)) at (Position of PowerShield_Target) facing Default building facing degrees
      • Unit - Order (Last created unit) to Neutral Pit Lord - Howl Of Terror
      • Unit - Remove (Last created unit) from the game
      • Set PowerShield_ShieldLife = (100.00 + (100.00 x (Real((Level of (Ability being cast) for PowerShield_Caster)))))
      • Countdown Timer - Start PowerShield_Timer as a One-shot timer that will expire in (8.00 x (Real((Level of (Ability being cast) for PowerShield_Caster)))) seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PowerShield_TakesDamageEvent Equal to False
        • Then - Actions
          • Trigger - Add to Power Shield Activate &lt;gen&gt; the event (Unit - PowerShield_Target Takes damage)
          • Set PowerShield_TakesDamageEvent = True
          • Else - Actions
            • Do nothing


Trigger:
  • Power Shield Activate
    • Events
    • Conditions
      • (PowerShield_Target has buff Power Shield ) Equal to True
    • Actions
      • Set PowerShield_ShieldLife = (PowerShield_ShieldLife - (Damage taken))
      • Unit - Set life of PowerShield_Target to ((Life of PowerShield_Target) + (Damage taken))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (PowerShield_Target has an item of type Aghanim&#039;s Scepter) Equal to True
          • ((Attacking unit) is A structure) Equal to False
          • ((Attacking unit) is Mechanical) Equal to False
        • Then - Actions
          • Unit - Cause PowerShield_Target to damage (Damage source), dealing (Damage taken) damage of attack type Hero and damage type Normal
        • Else - Actions
          • Do nothing


The If in the trigger above (Power Shield Activate) is just for an improvement when you get an item. Like DotA.


Trigger:
  • Power Shield DeActivate 1
    • Events
      • Game - PowerShield_ShieldLife becomes Less than or equal to 0.00
    • Conditions
    • Actions
      • Unit - Remove Power Shield buff from PowerShield_Target


Trigger:
  • Power Shield DeActivate 2
    • Events
      • Time - PowerShield_Timer expires
    • Conditions
    • Actions
      • Unit - Remove Power Shield buff from PowerShield_Target
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
1). Try to use "Starts the effect of an ability" instead of "Begins casting an ability". The second one fires before cooldowns and manacost take effect, so users can manipulate this to bring about effects without actually casting.

2). These triggers aren't MUI; that is, they only work on one unit at a time. If that's OK with you.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top