HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Dealing damage...

09-02-2005, 03:32 AM#1
Ignitedstar
I'm making an ability that deals AOE damage based on how much life is missing from the hero. Not in percent, but in it's real value.

Example: If the hero has is missing 600 life at the time it uses the ability, it deals 1.5 times the amount of life missing, for a total of 900 AOE damage to all enemy units in an AOE range of 400.

If you don't understand, then please say so. Thanks in advance.
09-02-2005, 04:55 AM#2
Spathis
Quote:
Originally Posted by Ignitedstar
I'm making an ability that deals AOE damage based on how much life is missing from the hero. Not in percent, but in it's real value.

Example: If the hero has is missing 600 life at the time it uses the ability, it deals 1.5 times the amount of life missing, for a total of 900 AOE damage to all enemy units in an AOE range of 400.

If you don't understand, then please say so. Thanks in advance.

Well... This has a lot of leaks but it's the general idea of what you should do.

Events - A unit starts the effect of an ability

Actions
Set TargetUnit = target unit of ability being cast
set TargetGroup = units within 400 of TargetUnit matching (matching unit) is an enemy of (triggering unit) = true
Set TargetDamage = 1.50 x ((Max health of TargetUnit) - (Current health of TargetUnit))
Unit group - Pick every unit in TargetGroup
Order (triggering unit) to damage (picked unit) for TargetDamage
09-02-2005, 05:01 AM#3
Ignitedstar
Hmm... maybe something like this?

Events:
Unit starts the effect of an ability

Conditions:
Ability being casted equal to <Spell being cast>

Actions:
Unit: Deal AOE damage in a radius of 400 at Position of Triggering Unit dealing (Unit Property - Triggering Unit's Max Life) - {Unit Property - Triggering Unit's Current Life} x 1.50

Does that work? I'm just putting things together and interpreting what Spathis is saying.
09-02-2005, 05:31 PM#4
oNdizZ
if you are refering to the "Unit - Damage Area" when you said "Unit: Deal AOE damage" then have in mind that the Unit - Damage Area targets every unit in the aoe, friends aswell as enemies.

if you want any conditions (only target enemies, only target living units etc.), then you'll have to make it like Spathis.
09-02-2005, 11:54 PM#5
Ignitedstar
I see. Okay, thanks a lot. That was something I didn't know.