Trigger-Detect Invulnerability

ThePlague

New Member
Reaction score
14
How can I check if a unit is invulnerable in a trigger?

And I mean any type of invulnerability

Theres no Unit is invulnerable equal to true so...
am i missing something or is there a native i can use?
 

XeNiM666

I lurk for pizza
Reaction score
138
Code:
(Level of Invulnerable (Neutral) for (Triggering unit)) Greater than 0
 

ThePlague

New Member
Reaction score
14
And I mean any type of invulnerability

Wouldnt your thing only work for units who have invulnerability through that ability?

I need it to work for everything.
(Invulnerable <neutral>, Divine shield, Big Bad Voodoo, Triggered invulnerability, etc)
 

Jagan

New Member
Reaction score
30
Hmm...maybe pick units in a group then set and check If Matching Unit is Invulnerable Equal to True?

EDIT: Lol wait you can't do that. Sorry, my bad. XD
 

XeNiM666

I lurk for pizza
Reaction score
138
For the abilities, just check whether they have the buff, as for the triggered invulnerability, add them to a group, chack if they are in the group and after a duration, remove them from a group
 

ThePlague

New Member
Reaction score
14
I cant find a function like that under Boolean. (Thats where it would be right?) can you point out exactly where it is or just post the Jass function equivalent to it?

Edit: I'll go with the checking for every single buff if i really have to.. but surely theres a better way?
 

the_ideal

user title
Reaction score
61
I have an idea. Make a dummy unit with an aura that has targets - invulnerable, allies, enemies set. Make the area of effect large enough to cover the entire map. Then you can use a boolean comparison - unit has buff (invulnerable dummy) equal to (true) to see if a given unit is invulnerable. The buff icon could just be a black square as well, so it would be almost unnoticable.
 

Weegee

Go Weegee!
Reaction score
102
Here ya go

The only problem is that it requires it so that when you cast an ability AND that it has to have a specific buff but theres many alternates then just that :D
 

Weegee

Go Weegee!
Reaction score
102
No The Plague it doesn't if you check the trigger it checks for the BUFF so all you would need to do is add the buff and remove the spell animation (thing that appears around the unit) otherwise you want to check post 5
 

MaxTM

New Member
Reaction score
2
Try 1:
I would try to make a group for invul units, if some unit becomes invulnerable i add to group, if some lost invul, i remove it from group.

If you do this, you will have management of all invul units

Try 2:
Use the same buff for all invul on your map, so you can check if the unit have that buff. If it do, it is. If dont, it dont.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top