| 05-11-2007, 08:15 PM | #1 |
hi i have a question : how i can made that the taken damage from a unit is sett in a variable ? but ist musst be a unit that is a target of an abill ![]() |
| 05-11-2007, 08:23 PM | #2 |
There is a real function called Event Response - Damage Taken That however will work only with the event <Unit> takes damage unfortunetly the event is only specific unit event, which means you'll have to add the event from another trigger. The tough part if to make it that it would run only when the damage is caused by an ability. With JASS it's can be done, but with GUI it will not be an MUI system. I could post either in JASS or in GUI, but as I said, GUI version is not MUI. |
| 05-11-2007, 08:24 PM | #3 |
Well in the case you're talking about a damaged event... JASS:local real damage = GetEventDamage() I'm guessing you're targeting a unit with an ability and want to know the damage it takes. Shouldn't that be hardcoded into the ability? If not, I really don't have any other idea what you might be saying. Please elaborate and be more specific? |
| 05-11-2007, 08:36 PM | #4 |
From my understanding he(/she) wants to get the damage caused to a unit but only when the damage is caused by an ability. We could use the event Unit begins casting an ability and then create local trigger that will basically do: target is damaged damaging is caster get damaged real destroy trigger It's not that hard, just trying to understand if that's what you want. |
| 05-12-2007, 05:09 PM | #5 |
i want to make a abill that gives an unit a buff and if that unit attacks 20% of the damage that this unit deals get the caster of the abill as live back sry for bad english ^^ ![]() |
| 05-13-2007, 09:09 PM | #6 |
So you want direct life steal? Or do you want some ability that when unitA attacks unitX casterA (the provider of the buff) gains 20% of unitA's attack damage as health (indirect life steal)? |
| 05-13-2007, 09:39 PM | #7 |
I would just do every .04 seconds, set LifeReal[1] to current life, and then do lifereal[2-1] and if its a positive, multiply by .2 and you have 20% of the damage taken. Then set lifereal[2] to current life. |
| 05-14-2007, 11:01 AM | #8 | |
Quote:
i want : casterA cast an abillity on unit x if unit x attacks unit y than casterA get 20% of the damage that unit x deals |
