Apply actions to every picked unit (easy)

Status
Not open for further replies.
Level 3
Joined
Oct 5, 2016
Messages
53
Somehow I just can't figure out how to do this. For example, unit uses a spell. Triggers procs - pick every enemy unit and deal 10 dmg to any with interval like 1 sec. If I use regular unit group, trigger just stops when encounter "wait". The goal is to make trigger as compact as possible.
 
Level 3
Joined
Oct 5, 2016
Messages
53
Using waits for such a thing is not really encouraged but you could:

loop from 1 to 10
wait 1 second
unit group - pick units in..
deal damage to picked unit
This would deal damage 10 times, with an interval of 1 second

Wouldn't it damage the same unit? My goal is to strike each unit once only.
 
Level 3
Joined
Oct 5, 2016
Messages
53
I did not describe my issue correctly. The ability should damage every unit in area once with some interval. Damages unit 1 , wait 1 sec, unit 2, wait, etc.
 

Deleted member 247165

D

Deleted member 247165

I did not describe my issue correctly. The ability should damage every unit in area once with some interval. Damages unit 1 , wait 1 sec, unit 2, wait, etc.
Man, Chaosy showed you how to damage a group of units, exactly what you need. It will not strike the same unit 10 times. It's a GROUP, not a single unit.
 

Deleted member 247165

D

Deleted member 247165

It's a loop for God sake...read a tutorial please...
 

Deleted member 247165

D

Deleted member 247165

Probably but what you showed him will not damage the units only once...it's a loop. He seems not to understand it yet. I think he should read a tutorial.
 

Chaosy

Tutorial Reviewer
Level 41
Joined
Jun 9, 2011
Messages
13,239
Could do

Loop 1-10
wait 1 second
set my_group = whatever group you want
damage random unit in my_group
It should be altered slightly based on needs but that is one way to do it.
It would damage one random unit in the group every 1 seconds.
If you want to avoid hitting the same unit you move the group outside the loop and then remove the random unit from said group in the loop.
 
Level 3
Joined
Oct 5, 2016
Messages
53
Could do

Loop 1-10
wait 1 second
set my_group = whatever group you want
damage random unit in my_group
It should be altered slightly based on needs but that is one way to do it.
It would damage one random unit in the group every 1 seconds.
If you want to avoid hitting the same unit you move the group outside the loop and then remove the random unit from said group in the loop.
ok thanks
 
Level 11
Joined
May 16, 2016
Messages
730
Somehow I just can't figure out how to do this. For example, unit uses a spell. Triggers procs - pick every enemy unit and deal 10 dmg to any with interval like 1 sec. If I use regular unit group, trigger just stops when encounter "wait". The goal is to make trigger as compact as possible.
MUI
 

Attachments

  • AOE PERIODIC DAMAGE.w3x
    22.7 KB · Views: 21
Last edited:
Status
Not open for further replies.
Top