HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Refunding Life

02-16-2006, 07:20 PM#1
Chuckle_Brother
Alright, for a map I am currently helping with I am making a projectile type system to replace the standard crappy WC3 attack system. So It is based on a generic unit takes damage event, but I hit a bit of an issue. I need it to instantly refund the damage taken to the unit taking the damage, but the event "Unit Takes Damage" seems to be firing just BEFORE the life is actually taken away, which effectively cancels out the refund of life I am attempting to give.

Does anyone know a way around this?
02-16-2006, 07:22 PM#2
Captain Griffen
Why do you want to instantly refund the damage taken?
02-16-2006, 07:42 PM#3
Chuckle_Brother
Cause its a projectile system, when a unit attacks I want to negate that attack and have the actual damage caused by a bullet system, but even with the life being put back the units can stil be injured somehow
02-16-2006, 07:44 PM#4
Anitarf
if the unit is at max life, use a short wait for damage to be dealt first and then apply the life refund.
02-16-2006, 07:50 PM#5
Whitehorn
Make units deal 0 damage?
02-16-2006, 07:52 PM#6
Taur
dealing 0 damage will mean he will be unable to attack.
02-16-2006, 07:57 PM#7
Captain Griffen
I think you can set it to 0, but you need to set something to -1.
02-16-2006, 08:32 PM#8
Whitehorn
Try this.
Attached Files
File type: w3xNoDamageMap.w3x (23.7 KB)
02-16-2006, 09:18 PM#9
Chuckle_Brother
Unit is attacked is an evil evil event, plus I need Damage Taken
02-16-2006, 10:38 PM#10
Whitehorn
No damage is dealt, so you don't need to do a dodgy life refund.
02-16-2006, 10:47 PM#11
shadow1500
Use hardened skin ability
02-17-2006, 03:38 AM#12
BBDino
I'm pretty sure it is possible in the Unit Editor to make a unit do 0-0 damage, however if this is not the case surely a -1 damage bonus (from the item abilty) would suffice on a 1-1 damage unit?
02-17-2006, 08:44 AM#13
Whitehorn
Quote:
Originally Posted by BBDino
I'm pretty sure it is possible in the Unit Editor to make a unit do 0-0 damage, however if this is not the case surely a -1 damage bonus (from the item abilty) would suffice on a 1-1 damage unit?

I guess you didn't look at the map where I just did that...

Refunding life is a terrible idea. What if a guy with 1 life gets hit? He dies. You can't refund life to dead units.
02-17-2006, 08:52 AM#14
qwertyui
Try giving the unit a 100% chance -100% damage critstrike, and hide it with spellbook disabling trick.

I believe someone said on this forum before that if you do it, the red zeroes won't be popping up too.
02-17-2006, 09:06 AM#15
Whitehorn
Why oh why? I've already shown a simple way to do it.