• 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.

Damage Absorbing Shield (GUI)

Status
Not open for further replies.
Level 11
Joined
Jul 9, 2009
Messages
927
Can anyone tell me how to make this kind of spell.
I was trying to think of setting the health of the hero as a variable
and a trigger that will check if the hero's hp is equal to the variable stored.
If not, I will Subtract the stored variable with the current HP of the hero then I will set the health of that hero back to the stored health variable then have the shield maximum absorb amount be subtracted to the damage dealt that was stored a while ago. I would not know if it would work though.

If anyone else knows how please share your knowledge. thanks in advance :)
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
need this http://www.hiveworkshop.com/forums/...prev=search=gui%20damage%20engine&d=list&r=20

  • Set Damage
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • DamageEventOverride Equal to False
    • Actions
      • Set CV = (Custom value of DamageEventTarget)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DamageShield[CV] Greater than or equal to 0.00
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DamageEventAmount Greater than or equal to DamageShield[CV]
            • Then - Actions
              • Set DamageEventAmount = (DamageEventAmount - DamageShield[CV])
              • Set DamageShield[CV] = 0.00
              • Special Effect - Destroy (Load CV of 0 in Hashtable)
            • Else - Actions
              • Set DamageShield[CV] = (DamageShield[CV] - DamageEventAmount)
              • Set DamageEventAmount = 0.00
        • Else - Actions
      • Game - Display to (All players) the text: (damage on + ((Name of DamageEventTarget) + (String(DamageEventAmount))))
      • Game - Display to (All players) the text: (shield left + (String(DamageShield[CV])))
  • Cast shield
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Summon Water Elemental
    • Actions
      • Set DamageShield[(Custom value of (Triggering unit))] = ((Real((Level of (Ability being cast) for (Triggering unit)))) x 1000.00)
      • Special Effect - Create a special effect attached to the chest of (Triggering unit) using Abilities\Spells\Items\StaffOfSanctuary\Staff_Sanctuary_Target.mdl
      • Hashtable - Save Handle Of(Last created special effect) as (Custom value of (Triggering unit)) of 0 in Hashtable
 

Attachments

  • gui dmg shield.w3x
    29.4 KB · Views: 95
Level 11
Joined
Jul 9, 2009
Messages
927
I already finished the spell using an old spell of Pharaoh_.
Thanks for trying to help though. +rep :)
 
Status
Not open for further replies.
Top