----------
Basicly you should not create multiple triggers with same event, but try to put all stuff into one trigger with this event.
Only situation you should not do so if you lose a lot of readability, or you create a system/spell and want to seperate the actions.
----------
Ok, thanks!
----------
And no. Periodic event is no evil function. It just depends on the operations you use inside it. For example PickAllUnits... (UnitGroup iterations) is very costly and should not ber more often then minimum ~0.03.
PickingAllUnits every second would not be too recognizeable I think (if there are not too many units), but still picking every single unit is highly inefficient and should be avoided if possible.
I don't know the exact situation, but try to use other events or to use a global UnitGroup where you add/remove units and never gets destroyed.
This way you would not create a new UnitGroup each interval and would not pick all unnessary units.
----------
Hmm... So it sounds that the "Pick All Units" is too 'costly' (in terms of what, ping? Or computational/processing speed?), but using a global "UnitGroup" variable would be a decent alternative that would allow it?
(But whether I "pick all units matching X, Y, Z..." or create a UnitGroup variable which does the same thing (having to check the map to add/remove the necessary units from the Group), it seems like that's the same amount of work. Maybe I don't understand)
It's not so much an "exact situation", but more of a general principle. Take, for example, a simple spell; "Giving the Target +Armor". Since I can't use Frost Armor or reverse Acid Bomb (can't have any buff conflicts), I could just use a simple, hidden "+1 Item Armor" ability, and add/remove it based on the presence of a (non-conflicting) Buff. i.e.
Event:
Every 1.00 Seconds of gametime
Conditions:
Actions:
Pick Every Unit ... in Map
IF
Picked unit has ArmorBuff
THEN
Add "+1 Item Armor" ability
ELSE
Remove "+1 Item Armor" ability
This method allows me to get around the buff-conflicts, and I can pretty much make any kind of ability I want (as long as I can passively add/subtract hidden abilities). Unit-target Phoenix Fire? Unit-target Healing Ward? Unit-target Goblin Mine? Etc.
However, like I said, I could have had a bunch of these in my map... And even all stacked together, I feel it would be a mess. More than that, I worry that even one would drag down the gameplay; so I have abstained.
Does that make more sense?