| 08-30-2004, 01:44 AM | #1 |
I need a little help, In a trigger, whats the most effiecient way to make sure a unit doesn't target a spell immune unit, and how do you make it so theres more than one condition for matching units? |
| 08-30-2004, 07:45 AM | #2 |
2nd question: use the condition "and" - it allows you to put in two conditions (any of them can again be "and"). |
| 08-30-2004, 01:50 PM | #3 |
I actually prefer using the object editor for this sort of problem. You could (but then again, you asked for triggers) do it by making units unable to attack i.e. ancients (or some other unit classification) and classify all spell immunes as ancients. If they become spell-immune in-game, just use a trigger to add that classification to them in game, since classifications are easy to add and remove with triggers. |
| 08-30-2004, 01:57 PM | #4 |
That would work if they become spell immune during the game, but the hard part is to detect already spell immune units from the start of the game. Its a bit harder than it seems. ![]() |
| 08-30-2004, 02:09 PM | #5 |
If you don't want to do that, you can just make them spell-immune in game; it's not hard to do no matter how many units you want the immunity on. |
| 08-30-2004, 03:57 PM | #6 |
For the spell immune my problem was, I had a trigger that when a spell was cast it creates these units to cast the damaging part of the spell, however because I had it set so it would choose random unit, sometimes it picked spell immune, so it wasted a "shot" of the spell. I supposed with the "and" conditions I could go around this by making sure it doesn't select any unit that has any spell immunity. But I scratched the spell for now due to a lot of other conflicts as well. thanks |
