AOE Spells with Buff question

chobibo

Level 1 Crypt Lord
Reaction score
48
Hello guys! Thanks for any help.
I was playing around with the skill Impale just earlier and I wondered if I could possibly detect the units affected by the spell by detecting the buff it gives and then modify the affected unit's properties.
For example, Caster casts impale, affected enemy gets slowed for 4 minutes.
Is that even possible? Thanks for your answers.
 

Frozenwind

System maker
Reaction score
99
Yes:

Code:
custom script: (local unit a)
Pick every unit in entire map
    if unit has buff impale and unit is in unitgroup_var equal to false
        then add unit to unitgroup_var
            set unit_var = picked unit
            unit - create 1 DUMMY
            unit - add expiration timer to last created unit expire in 1 second
            unit - order last created unit to attack picked unit [B](The dummy has frost attack)[/B]
custom script: (set a = udg_unit_var)
wait (60*4) seconds
custom script: (set udg_unit_var = a)
unit - remove buff (frozen) from unit_var

frozenwind.

EDIT:
don't forget to remove the unit from the unitgroup when he loses impale.
 

Chjoodge

New Member
Reaction score
14
You can check for the Impale cast and then do whatever you wish with enemy ground units in a range around the (Target point of the ability being cast).
 

chobibo

Level 1 Crypt Lord
Reaction score
48
Thanks for the script frozenwind!
hey Chjoodge, can I ask you to make a script like the one youre saying, Only if you have time and thanks man!:)
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
A Tip :

You don't need to use Frost Attack. You can use Slow Poison, or just plain Slow / Cripple.

Also, frozenwind's trigger forgot a Point leak.
 

NetherHawk

New Member
Reaction score
26
it will be much more complicated then that. impale has an air duration, u have to wait the wave distance + the air time before checking for the impale buff.
after that just create a dummy unit to cast slow which has a duration of 4minutes(240s).
you dont need to wait and remove buff.

group is a unit group variable
temp_pos is a point variable

event - unit starts the effect of an ability
condition - ability being cast = blah blah
action - wait (wave +air sec)
set group = units in playable map area with buff 'blah'
loop
set temp_pos = position of picked unit
create 1 slow dummy for ower of triggering unit at temp_pos facing default
order last created unit to slow picked unit
add a 1 sec generic expiraiton timer to last created unit
custom script: call RemoveLocation(udg_temp_pos)
---------
outside the loop
--------
custom script: call DestroyGroup(udg_group)

create a custom dummy and give it the slow ability, set mana cost to 0, cast range to 999999
duration to 240s. give it the model file .mdl and no shadow, invulnerability if u like, disables its attacks too. rather standard procedures for dummy casters.

imo: frozenwind's method is too complicated. if you dont do it properly, those dummies you create to attack might sometimes even attack other nearby unit -- by doing so , sometimes fail to attack thier intended order-ed target.
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
Unless the trigger is Periodical, which, is recommended.
 

NetherHawk

New Member
Reaction score
26
what do u mean? periodical check on the buff? it might lag... further more, this is not mui, it might cause a lot of problems.
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
No, Periodical Event (well, it checks on buff so it's the same XD)
Every 0.03~0.04 sec, check for units with Impale buff.
Then make a unit with some-slowing-effect and do the effect to the unit, and add the unit to a Unit Group.
You're supposed to not give the effect to someone inside the Unit Group.

When someone from the group loses the Impale buff, remove it from the group, so it can be slowed again (re-setting the 4 minutes timer) Also when the unit dies, remove it from the group (heck dying also removes the buff :p)

It doesn't matter if it's MUI or not, no one is doing damage so finding out who did it doesn't matter, as long as it is slowed.

EDIT :
If you use frozenwind's method, using Frost Attack, then make the attack cooldown higher than the expiration timer, so it'll attack only once.
 

Frozenwind

System maker
Reaction score
99
imo: frozenwind's method is too complicated. if you dont do it properly, those dummies you create to attack might sometimes even attack other nearby unit -- by doing so , sometimes fail to attack thier intended order-ed target.
E: unit is attacked
C: attacking unit is dummy
A: remove dummy

Also, frozenwind's trigger forgot a Point leak.
Yup, and an unitgroup leak, were to lazy to fix it xD.

You can use Slow Poison, or just plain Slow / Cripple.
Frost attack was example, it totally depends on what he wants.

Here its leakless:
Code:
custom script: (local unit a)
set unitgroup2_var = units in entire map
Pick every unit in unitgroup2_var
    if unit has buff impale equal to true and unit is in unitgroup_var equal to false
        then add unit to unitgroup_var
            set unit_var = picked unit
            set point_var = "whereever you want ur dummy to be created"
            unit - create 1 DUMMY at point_var
            custom script: (call RemoveLocation (udg_point_var))
            unit - add expiration timer to last created unit expire in 1 second
            unit - order last created unit to attack picked unit (The dummy has frost attack or whatever you need.)
custom script: (call DestroyGroup (udg_unitgroup2_var)
custom script: (set a = udg_unit_var)
wait (60*4) seconds
custom script: (set udg_unit_var = a)
unit - remove buff (frozen) from unit_var
custom script: (set a = null)
Might forgot 1 more...

frozenwind.
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
>
E: unit is attacked
C: attacking unit is dummy
A: remove dummy
<

This is a little bit too soon... should wait for a few micro-seconds since there's backswing and damage point animation.
Having the attack cooldown higher than the Expiration Timer is easier, making it only attack once until it is killed.
 

Frozenwind

System maker
Reaction score
99
True, using cooldown takes less triggers too...
So, I'd pick ur cooldown thingy.

frozenwind.

PS
U might need to check magic immunity in ur trigger? (its at boolean)
 

NetherHawk

New Member
Reaction score
26
if u use attacking dummy thing, u will remove it before it even slow the target.

but u see from the trigger, frozenwind, you can remove the buff from 1 unit only. you get what i mean? set all the units to be slowed into a unit group

e.g. group_2 = Pick every unit in unitgroup2_var
if unit has buff impale equal to true and unit is in unitgroup_var equal .......

unit group - pick all units in group_2
loop - remove buff
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top