| 03-20-2008, 10:08 AM | #1 |
I would like to make an ability like flaming arrows, which deals additional damage based on many factors. Which event can I use to detect when a unit is hit by ability like that? EVENT_PLAYER_UNIT_SPELL_EFFECT etc doesnt work... Any ideas? |
| 03-20-2008, 10:45 PM | #2 |
You can't detect it (like you can't detect critical strike, evasion etc.). |
| 03-21-2008, 12:25 AM | #3 |
well, you could use "a unit is attacked" and then check to see if they hav a buff from gettin fire arrowed. |
| 03-21-2008, 04:10 AM | #4 |
You can detect when flaming arrows is cast, but only when its manually cast, not autocast. In order to "detect" flaming arrows when it is autocast, you can detect it from the unit commands. What you do is create a disabled trigger that turns on when a unit issues the command with no target "flamingarrowson". The trigger that is now enabled can operate off the "unit is attacked" event, only make sure that the enabled trigger makes sure the unit has enough mana (Condition: Unit has >= X mana needed to autocast spell). Now when the unit is issued the order "flamingarrowsoff", have the enabled trigger turn off. Making this MUI is another problem, but let me know if you need more explanation. |
| 03-21-2008, 05:59 AM | #5 |
y so much trouble Once a unit takes damage(global dynamic trigger), check if that unit has that "unique" buff you assigned your ability ("flaming arrows") with, done. |
| 03-21-2008, 09:42 AM | #6 |
UnMi could you give an example? There is no event like unit takes damage! Maybe there is something wrong with my world edit? |
| 03-21-2008, 03:18 PM | #7 |
UnMi u copied my answer! (well not quite, but u know what i mean) Weirdly my native for that has disapeared aswell... (yes, it is WTF) you could just have a periodic function that pics all units with the buff that comes from the arrows and then does stuff to the unit |
| 03-22-2008, 12:59 AM | #8 | ||
Quote:
This means you have to have an unit variable to give this event or you just use preset units on the map. Quote:
|
| 03-22-2008, 07:03 AM | #9 | |
ah yes ur right, i keep forgetting this stuff. thats why i added the "(well not quite, but u know what i mean)" bit, so u will understand =P my way will look retarded when used on ranged units lolol If you dont get it Makier heres a
|
