| 02-02-2007, 05:04 PM | #1 |
I need to make the trigger 'damage unit' cause damage of 30% of the casting unit's current HP and other 'damage unit' triggers cause like 500 + however much strength/int/agi they have be the +% damage added to 500 by the casting unit. Can you tell me how to do this by using the 'damage unit' function please? Thanks in advance. |
| 02-02-2007, 05:49 PM | #2 |
Get the total health of the unit, multiply by .3 and then use that value for the damage. Same method as the other one, except get the attribute of the hero and add it to 500. |
| 02-02-2007, 06:01 PM | #3 |
like this? life of triggering unit x 0.30? I want the damage to be 30% of the units current hp, not +30% |
| 02-02-2007, 06:31 PM | #4 |
If you multiple the current health with 0.3 it's 30%. => 100% = 1.00 => 30% = 0.3 |
| 02-06-2007, 04:33 PM | #5 |
ok, well how do I have the amount of stat points be converted to a % amount? |
| 02-14-2007, 04:39 PM | #6 |
First you have to convert the hero stats from real to integar before you can use them at all. This is under one of the commands (the exact extension eludes me). After that its simple math. For damage you do ((hero stat(agill)be converted from real to integer) x 0.5) + 500) or however much % you want in place of 0.5, which is respective to 50%. This is more mathematics than triggering really. To review order of operations, this will obtain the hero's agil, then multiply it by 0.5 (same as 50%) then add 500 to it and that's your number. And yes you have finally found applications from your high school math courses in real life. |
| 02-15-2007, 02:02 AM | #7 |
One would argue that this is not exactly 'real life'. However, what you've posted basically sums it up, Castlemaster. |
