HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Mana-stealing attack trigger

08-09-2004, 10:29 PM#1
Vandell
Okay, this has been paining me. I've been trying to do a "mana-stealing" trigger. Basically, here is how I'm trying to get it..

Events:
o Unit - A unit is attacked

Conditions:
o Attacking unit has an item of type Helm of the Errant Soldier Equal to True

Actions:
o Unit - Set mana ot Attacking unit to (mana of attacking unit + Damage dealt x 0.15)

Note, however, that there is no "damage dealt" function. Thus, you may probably see my problem. How is this solved, if at all?
08-09-2004, 10:34 PM#2
Eeporgorg
There is the 'Event response- Damage taken' value.
08-09-2004, 10:40 PM#3
Rafael Br
The event response - damage taken will return the value when the trigger is fired by the specific unit event: " takes damage ", so, the trigger will not work.
08-09-2004, 10:49 PM#4
Vandell
Yes, I know.. see my problem now? ;p
08-09-2004, 11:01 PM#5
Rafael Br
There is a lot of ways to pick the damage dealt, but most of them are not too good , you could use a variable to set the life of the attacked unit before it was attacked, and after, then make the difference, another way you could make that unit attack a dummy unit, some timmes, to pick it's averange damage.I think there is no enhanced editor that do this too.
08-09-2004, 11:15 PM#6
Vexorian
It is actually impossible to retrieve the damage taken and the attacker at the same time
08-10-2004, 01:04 AM#7
Raptor--
Quote:
Originally Posted by Lord Vexorian
It is actually impossible to retrieve the damage taken and the attacker at the same time

well it is technically possible, but the restrictions are that a unit may only be attacked by one unit at a given time
08-10-2004, 01:58 AM#8
ProFeT
i already made this spell and i don t had any problem, i ll search in my old maps and i ll say you the good way to do it :)
08-10-2004, 02:37 AM#9
ProFeT
if u have only one unit that have the helm, u can store it in a variable and then u could use the event "unit takes dammages".
08-13-2004, 04:18 PM#10
Vandell
Well, the problem is that I can't seem to find the unit-event "unit takes damage", or else I'd probably be able to do this.
08-13-2004, 04:43 PM#11
Eeporgorg
I'm pretty sure it's under the "Generic Unit Event" option.
08-13-2004, 07:42 PM#12
Arksword(sv)
Actually, Unit Takes Damage is a specific unit event, so even if that worked, it would take a long time to do it for each unit, not to mention making it impossible to work for units that havent been created yet.