HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Checking for invulnerability

01-25-2008, 06:10 PM#1
darkwulfv
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
xombie
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
Malf
GetUnitAbilityLevel(Unit,'Avul') == 0 returns true if the unit isn't invulnerable.
01-26-2008, 03:59 PM#4
xombie
Quote:
Originally Posted by Malf
GetUnitAbilityLevel(Unit,'Avul') == 0 returns true if the unit isn't invulnerable.

Oh, wow, I didn't even know that 8O
01-27-2008, 04:29 AM#5
darkwulfv
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
The Elite
lol i was playing some ORPG and some people left cause i guy died while invulnerable