• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Making buff go away immediately

Status
Not open for further replies.
Level 16
Joined
Jul 21, 2008
Messages
1,121
You will have to remove buffs with triggers.

  • Actions
    • Set TempPoint = (Position of <Your Unit>)
    • Set TempGroup = (Units within <Aura Range> of TempPoint)
    • Custom script: call RemoveLocation(udg_TempPoint)
    • Unit Group - Pick every unit in TempGroup and do (Actions)
      • Loop - Actions
        • Unit - Remove <Aura Buff> buff from (Picked unit)
    • Custom script: call DestroyGroup(udg_TempGroup)
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
You will have to remove buffs with triggers.

  • Actions
    • Set TempPoint = (Position of <Your Unit>)
    • Set TempGroup = (Units within <Aura Range> of TempPoint)
    • Custom script: call RemoveLocation(udg_TempPoint)
    • Unit Group - Pick every unit in TempGroup and do (Actions)
      • Loop - Actions
        • Unit - Remove <Aura Buff> buff from (Picked unit)
    • Custom script: call DestroyGroup(udg_TempGroup)
for me its just removes buff and after 1-2 sec buff comes back again if my unit is in aura:/


it would be nice to remove 3 sec delay when unit leaves the aura
 
Level 8
Joined
Mar 12, 2008
Messages
437
you know for event unit enters within range of unit,
but is there any event unit leaves within range of some unit so you can make auras with no delay?


or other way is only to check it like every 0.2 sec if unit is out of range of unit that has aura

Yes, you have the action "Time - Periodic event", and the condition "Real comparison" and the function "Math - Distance between Point1 and Point2 Greater than X".
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
Exactly what do you want to do?
unit leaves within 1000 range of unit (that has aura)
-remove (Aura Buff) from leaving unit

>maybe is could be possible in some JASS trigger


but there is only event unit comes withing range of some unit:(
for regions you have both events (unit leaves/enters region) and for unit you have only enters...so stupid...:hohum:



well periodic event is not so bad but its better do do it when it is only needed
 
Level 2
Joined
Mar 13, 2008
Messages
24
Couldn't you just do something like this...?


Events
Unit - A unit leaves (Region centered at (Position of "Your Unit Here") with size (double the AoE, double the AoE))
Conditions
Actions
Unit - Remove Aura buff from (Leaving unit)

Though this will only work if you start the game with the Aura making unit on the map.

Just a thought. Not sure what kind of map it is... Hope this helps.
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
not for me....the problem is that region is not a circle

better just pick units

pick every unit that has ability (Aura)
-set POINT = position of picked unit
pick every unit with buff of Aura
--set POINT_2 = position of picked unit
> if distance between POINT and POINT_2 greater than <x> range
- remove buff from picked unit
-RemoveLocation(udg_POINT)
--RemoveLocation(udg_POINT_2)



-POINT is position of unit with aura ability
-POINT_2 is position of unit that has buff (and if it has aura buff and he is already away from <x> range - remove aura buff)




maybe there is something in game contains like - aura delay
 
Status
Not open for further replies.
Top