| 01-25-2008, 06:10 PM | #1 |
Is there any way to check if a unit is invulnerable? And I mean when using SetUnitInvulnerable(GetTriggerUnit(), true). I couldn't seem to find a boolean or a function that returns a boolean related to this. |
| 01-25-2008, 06:38 PM | #2 |
You could create a dummy unit and order him to cast something that does nothing on the unit you are trying to check the invulnerability of. If the IssueTargetOrder(...) returns true, then the unit isn't invulnerable, while if it returns false, then the unit must be invulnerable. You would have to base the spell off of something that ignores spell resistance. |
| 01-25-2008, 11:51 PM | #3 |
GetUnitAbilityLevel(Unit,'Avul') == 0 returns true if the unit isn't invulnerable. |
| 01-26-2008, 03:59 PM | #4 | |
Quote:
Oh, wow, I didn't even know that 8O |
| 01-27-2008, 04:29 AM | #5 |
Woaw, haxx. +rep for that. It'll come in handy. Nothing sucks more than your hero dying while invulnerable... from AoE. |
| 01-28-2008, 06:16 AM | #7 |
lol i was playing some ORPG and some people left cause i guy died while invulnerable |
