• 🏆 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!

LIfesteal help.

Status
Not open for further replies.
Level 11
Joined
Dec 5, 2009
Messages
846
I want it in GuI the spell does like this:

The spell is based on parasite and when one unit dies with parasite on it will spawn one unit and when that unit deal dmg 20% of the dmg the zombie takes should go over to the unit that first casted parasite 35 % for lvl 2 and 50% for lvl 3.
 
Level 9
Joined
Oct 11, 2009
Messages
477
Use Palladon's damage detection system. Browse the hive and you will overlook it.

After the system fires, set the life of the damage source based on the lifesteal percentage then add an special effect so it will be look like it is a lifesteal, got it?
 
Level 11
Joined
Sep 30, 2009
Messages
697
Dude as i said you check how much damage was dealt and use
JASS:
SetWidgetLife(ParasiteOwner, GetWidgetLife(ParasiteOwner) + Damage*0.1 * spelllevel)
In GUI:
You need a variable for the ParasiteOwner and the SpellLevel:
  • Unit - Set life of ParasiteOwner to ((Life of ParasiteOwner) + ((Damage taken) + (0.20 + (0.15 x SpellLevel))))
 
Level 11
Joined
Dec 5, 2009
Messages
846
Thanks i just wanted to know the % thing +rep :)

But i have one last question :) i didn't find palladon's damage system so i took weeps dmg system here's the trigger

http://www.hiveworkshop.com/forums/...8/?prev=search=damage%20detection&d=list&r=20

But how can i make the lifesteal from there? please help me :) cuase i tested a unit is attacked then attacking unit equal to zombie and damage source equal to zombie but it didn't work :/. The damage source is a variable please look at the trigger and you will understand ;)
 
Last edited:
Level 11
Joined
Sep 30, 2009
Messages
697
well just do as the system says: Game - GDD_Event becomes Equal to 0.00 as event

GDD_Damage is the amount of damage, replacing Event Response - Damage Taken.
GDD_DamagedUnit is the damaged unit, replacing Event Response - Triggering Unit.
GDD_DamageSource is the damaging unit, replacing Event Response - Damage Source.

as he says ^^ reading the documentation helps you :p
 
Last edited:
Level 11
Joined
Dec 5, 2009
Messages
846
I know that :p but i need help with the trigger i did like this:



  • Events
    • Unit - A unit Is attacked
  • Conditions
    • (Unit-type of GDD_DamageSource) Equal to Zombie
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Level of Vampiric Curse for VC_Caster) Equal to 1
      • Then - Actions
        • Unit - Set life of VC_Caster to ((Life of VC_Caster) + (GDD_Damage x 0.20))
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Level of Vampiric Curse for VC_Caster) Equal to 2
      • Then - Actions
        • Unit - Set life of VC_Caster to ((Life of VC_Caster) + (GDD_Damage x 0.35))
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Level of Vampiric Curse for VC_Caster) Equal to 3
      • Then - Actions
        • Unit - Set life of VC_Caster to ((Life of VC_Caster) + (GDD_Damage x 0.50))
      • Else - Actions
I know that the
  • Conditions
    • (Unit-type of GDD_DamageSource) Equal to Zombie
is wrong but what should i put instead?

The VC_caster is already detected when he start casting the spell.
 
Status
Not open for further replies.
Top