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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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