• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

how to add invulnerable via aura

Status
Not open for further replies.
You have to trigger that effect.

Perhaps with a periodic trigger.

Have a unit group where you throw in all units with the invulnerability aura.

Create a trigger which checks every X seconds units within Y of those aura wielding units.

Add/remove a invulnerability ability to those units.

Edit:

Something like:

  • Invulnerability Aura
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in ugAura_Units and do (Actions)
        • Loop - Actions
          • Set uTemp_Unit = (Picked unit)
          • Set pTemp_Point_1 = (Position of uTemp_Unit)
          • Set ugTemp_Group = (Units within 500.00 of pTemp_Point_1 matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an ally of (Owner of (uTemp_Unit))) Equal to True)))
          • Unit Group - Pick every unit in ugTemp_Group and do (Actions)
            • Loop - Actions
              • Unit Group - Add (Picked unit) to ugAura_Group
          • Unit Group - Pick every unit in ugAura_Group and do (Actions)
            • Loop - Actions
              • Set pTemp_Point_2 = (Position of (Picked unit))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between pTemp_Point_1 and pTemp_Point_2) Greater than 500.00
                • Then - Actions
                  • Unit Group - Remove (Picked unit) from ugAura_Group
                  • Unit - Remove Invulnerable (Neutral) from (Picked unit)
                • Else - Actions
                  • Unit - Add Invulnerable (Neutral) to (Picked unit)
              • Custom script: call RemoveLocation (udg_pTemp_Point_2)
          • Custom script: call DestroyGroup (udg_ugTemp_Group)
          • Custom script: call RemoveLocation (udg_pTemp_Point_1)
A problem that might occur. If a unit already has the Invulnerability ability and still is within range the Invulnerability ability will be added again. I'm not sure if the unit then will have 2 of those abilities or if it will simply ignore that unit when adding.
 
Last edited:
Level 7
Joined
Mar 6, 2006
Messages
282
You could also have a dummy unit casting Big Bad Voodoo, and move it periodically on top of the caster.

And for this:

If a unit already has the Invulnerability ability and still is within range the Invulnerability ability will be added again.

Instead of adding the "Invulnerability" ability, you could just:

  • Unit - Make (Triggering unit) Invulnerable
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
A problem that might occur. If a unit already has the Invulnerability ability and still is within range the Invulnerability ability will be added again. I'm not sure if the unit then will have 2 of those abilities or if it will simply ignore that unit when adding.

Abilities will not be added twice.

One could use an aura that only gives a buff. Pick units in range that have the buff. All other filtering is done in object editor in Targets allowed. This way you don't have to use a long matching this and matching that and mathching whatever line.

Use a custom invulnerability ability so the aura does not clash with other possible invulnerability abilities.
 
Abilities will not be added twice.

One could use an aura that only gives a buff. Pick units in range that have the buff. All other filtering is done in object editor in Targets allowed. This way you don't have to use a long matching this and matching that and mathching whatever line.

Use a custom invulnerability ability so the aura does not clash with other possible invulnerability abilities.

Yeah of course. That's a better idea.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
You can use my Temporary Ability System which adds ability to unit for a certain amount of time and be removed automatically.

The idea is, to periodically pick unit group around the unit that has this ability, and add the ability (using my system) to the picked unit.
Of course to do this, you must add the learning hero/unit to a Unit Group for periodic enumeration over the time.

The duration of the added ability (my system) and the periodic timer determines the aura delay (getting/losing the aura).

I have created a test map, if you can take a look at it, you'll understand.
 

Attachments

  • Invulnerable Aura.w3x
    15.6 KB · Views: 67
Status
Not open for further replies.
Top