• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Spell Request - Passive Life Absorb

Status
Not open for further replies.
Level 12
Joined
Jan 13, 2008
Messages
559
Hello :) once again my attempt of creating this ability failed and I hope someone can help me with this probably hard one?

It is a passive ability. Whenever a friendly unit is in X range of the main hero, the main hero creates a bond between him and the friendly unit (bond should be visible by a special effect..like the lihtning effect of far seer or smthg similiar). He can connect multiple units with himself (so..not just one). Now, whenever the main hero attacks, it heals all the connected units its by X% of the main heroes attack damage (i stored the atk dmg already in a variable, so u dont need to take the actual dmg of the hero)

Is this impossible or doable? Thanks


/edit: or if its easier: the connected units share a damage reduction with the main hero. Likre that orc unit ability..(forgot the name)
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
Easily done.

Use a DDS to check when unit takes damage.
Check if anyone within radius has the life absorb ability. If true, store the unit (with the ability) into a variable.
Then heal all friendly units within radius of stored unit by damage * 0.X

The only part that is somewhat difficult is to display a lightning between targets.
I would use a simple lightning array for that.

edit: Noticed that it should only proc for the caster. So the first unit group is not needed, my bad.
 
Last edited:
Level 12
Joined
Jan 13, 2008
Messages
559
Easily done.

Use a DDS to check when unit takes damage.
Check if anyone within radius has the life absorb ability. If true, store the unit (with the ability) into a variable.
Then heal all friendly units within radius of stored unit by damage * 0.X

The only part that is somewhat difficult is to display a lightning between targets.
I would use a simple lightning array for that.

Well, you say it is easy but it's really not if you try it. It also.should be MUI ofc.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
It's MUI. And I am not lying, it is easy. Though easy is subjective.
  • damage
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (Level of Acid Bomb for GDD_DamageSource) Greater than 0
    • Actions
      • Set loc = (Position of u)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 400.00 of loc matching (((Matching unit) belongs to an ally of (Owner of GDD_DamagedUnit)) Equal to True)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Picked unit) Not equal to u
            • Then - Actions
              • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (GDD_Damage x 0.25))
            • Else - Actions
      • Custom script: call RemoveLocation(udg_loc)
 
Level 12
Joined
Jan 13, 2008
Messages
559
It's MUI. And I am not lying, it is easy. Though easy is subjective.
  • damage
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (Level of Acid Bomb for GDD_DamageSource) Greater than 0
    • Actions
      • Set loc = (Position of u)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 400.00 of loc matching (((Matching unit) belongs to an ally of (Owner of GDD_DamagedUnit)) Equal to True)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Picked unit) Not equal to u
            • Then - Actions
              • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (GDD_Damage x 0.25))
            • Else - Actions
      • Custom script: call RemoveLocation(udg_loc)

Hmm..okay. I tried it this way: Whenever the main hero attacks, pick every friendly unit in x range of X and heal them. So this works and I agree that this part is easy but.how do I createthe connections and when they are too far the connection gets canceled?
 
Status
Not open for further replies.
Top