Quick spell buff question

Status
Not open for further replies.
Level 9
Joined
Jun 4, 2007
Messages
206
I have a spell in my map that creates a Sanctuary, units that enter in the AoE will receive a great armor bonus and become almost invulnerable to attacks for a duration.

Basically its just a dummy unit that is created there and it has Devotion Aura with +999999 armor, with special effects as the image shows:
sanc.jpg


However, whenever a unit leaves the sanctuary, it still becomes affected by the aura for a few seconds, thus being 'invulnerable' for more seconds, I want to know a way to remove this buff immediatelly after a unit leaves the sanctuary range.
The range of the sanctuary is 300/400/500 and the duration of 'dummy unit' is 8/12/16, the devotion aura's range is correctly configured.

Please help! +rep
 
Cweener
The dummy unit is unable to move, however, the aura still reaches the units for a duration even if they are far away from the area (I checked object editor and the areas are perfectly correct too)

Mac MacNuggets
I know there is that action, I don't know the event or something that checks if the unit has left the sanctuary aoe.
 
And how exactly I do that? I'm not very good with groups and stuff like that...

Loop through the group
How is this done?

I tried like:
  • Sanctuary off
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Sanctuarydummies and do (Actions)
        • Loop - Actions
          • Set TempPointS = (Position of (Picked unit))
          • Custom script: set bj_wantDestroyGroup=true
          • Unit Group - Pick every unit in (Units within 700.00 of TempPointS) and do (Actions)
            • Loop - Actions
              • Set TempPointS2 = (Position of (Picked unit))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between TempPointS and TempPointS2) Greater than 300.00
                • Then - Actions
                  • Unit - Remove Sanctuary q buff from (Picked unit)
                • Else - Actions
              • Custom script: call RemoveLocation( udg_TempPointS2 )
          • Custom script: call RemoveLocation( udg_TempPointS )
Where, Sanctuarydummies is a group that adds the created dummy of the spell to the group, the area of sanctuary is now always 300(fixed), but still doesn't work...can you help me?
 
Status
Not open for further replies.
Back
Top