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

Status
Not open for further replies.
Level 2
Joined
Jun 7, 2007
Messages
6
Hi,

I wanna make a spell like the World of Warcraft spell "Powerword: Shield".
The idea is to cast a shield on a friendly Unit which absorb all damage.

eg: Unit A cast on Unit B a shield (absorb 1000 dmg). Unit B takes 800 damage. The shield protected Unit B. Now takes Unit B 800 damage again. But Unit B lost only 600 HP.

Ok I hope someone can help me, and sorry for my baaaaaaaaaaaad english :p
 
Level 35
Joined
Oct 9, 2006
Messages
6,394
triple post :p

cant the Banshees Anti-Magic Shield work as a Powerword : Shield?

It is anti magic not anti hp, but yes combines with the trigger I talked about (as the ability thats starts the effect)... and sry for the trible post, deletet them.. Hive went down when I postet, so didnt knew it had postet them..
 
Last edited:
Level 4
Joined
Jun 21, 2007
Messages
116
both of you are wrong

first of all, you need a Any unit takes damage event. It can be done in few ways, I suggest you search for them. Then when you cast a spell, make it place a buff, and set custom value of that unit to 1000. Whenever unit takes damage, check if it has a buff, if yes then:

set custom value to custom value - taken damage
set unit hp to unit hp + taken damage
if customvalue <= 0 then remove Shield buff from Damaged unit
 
Level 35
Joined
Oct 9, 2006
Messages
6,394
both of you are wrong

first of all, you need a Any unit takes damage event. It can be done in few ways, I suggest you search for them. Then when you cast a spell, make it place a buff, and set custom value of that unit to 1000. Whenever unit takes damage, check if it has a buff, if yes then:

set custom value to custom value - taken damage
set unit hp to unit hp + taken damage
if customvalue <= 0 then remove Shield buff from Damaged unit

Hmm wonder.. how can you say I am wrong when I havent even postet the trigger (which by the way also works...)
But your trigger also works as far as I can see. If you be helpful you could post it using trigger tags. Else I proably will.
 
Level 12
Joined
Feb 1, 2007
Messages
1,092
Rawr cant you change the spirit link then make it so when your shield.... thing is cast, the unit is given your spirit link, he then casts it on a dummy unit with 1000 hp, and then gets spirit link taken away? Just make spirit link last forever or.... however lon goyu want it and take no mana and it may work. IDK I am not sure here....
 
Level 2
Joined
Jun 7, 2007
Messages
6
can ynone give me a picture how i can do a shield (with dummy or without dummy) an believe: the shield disappears after 30 seconds so the spell pack with the sield is useless for me
 
Level 35
Joined
Oct 9, 2006
Messages
6,394
Make sure you have all the same variabels, and that you have createt them, custom scripts is very precies, but need to be 100% correct.
I could post you the dummy, maybe later when I hhave made it. But iron have a point, edit the shield pack and change the time it is to something like 5 hours or something.. surely it wouldnt ran out.. but does not understand why you want it to be there forever? Time Ability is better. Or maybe you want the sheild to regenerate like protoss from starcraft does?
 
Status
Not open for further replies.
Top