I've recently started using abilities to mark units. The ability does nothing and has no icon, so you can't even tell it's there. I use the abilities to determine what to do with them for certain triggers. This is mostly so that I don't have to check the unit type against several units that all behave similarly.
As an example, there are plenty of effects in my map that "corrupt" a unit (corrupt as in mind control, turn them into a zombie, turn them into a vampire, etc). To protect certain units (buildings, "holy" units, and heroes) from these effects, I was checking all these unit types and classifications to make sure it didn't hit them. I decided to simplify it to just check if they have the ability "Corruption Protection" which does nothing outside of these triggers. If they have it, then nothing happens. Otherwise, it does its normal thing and zombifies / mind controls them.
I've since used it for a whole bunch of other things in my map as well.
Here's my questions about it:
Is there any issue with doing this?
I am also wondering if it is better to use this than to use unit groups in the cases where I never need to loop over the unit group.
As an example, there are plenty of effects in my map that "corrupt" a unit (corrupt as in mind control, turn them into a zombie, turn them into a vampire, etc). To protect certain units (buildings, "holy" units, and heroes) from these effects, I was checking all these unit types and classifications to make sure it didn't hit them. I decided to simplify it to just check if they have the ability "Corruption Protection" which does nothing outside of these triggers. If they have it, then nothing happens. Otherwise, it does its normal thing and zombifies / mind controls them.
I've since used it for a whole bunch of other things in my map as well.
Here's my questions about it:
Is there any issue with doing this?
I am also wondering if it is better to use this than to use unit groups in the cases where I never need to loop over the unit group.