| 06-07-2004, 12:56 AM | #1 |
Howdy: I am working on a trigger where all enemy units around the caster are selected and then bombed with a nova. I am having difficulties in the unit group selection process. The trigger is selecting every unit in the area includeing the caster (triggering unit) and bombing them instead of just the enemies of the caster. Here is a line from the trigger for selection. Code:
Unit Group - Pick every unit in (Units within 512.00 of (Position of (Triggering unit)) matching (((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)) and do (Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl) I think my error is matching portion but im not sure, can anybody help? |
| 06-07-2004, 01:05 AM | #2 |
here you go this is a much easier code involving variables (i would like reputation please) lolz here you got 1 trigger wil say Event: XXX unit begans casting spell Condition: Spell equal to XXX Action: Set Variable XXX= (Region) to Region Centered on Casting unit with size (X,Y) another trigger will say something like Event: XXX unit begins casting spell Condition Spell Equal to XXX Action: Pick every unit owned by (nuetral hostile or w/e the enemy is)in Set Variable (from the trigger above) and Create XXX effect on picked unit. (you may need multiple Pick every unit actions for every player in the game... |
| 06-07-2004, 02:16 AM | #3 |
It is the matching portion. Within the matching condition part, you mus use (Matching Unit) and not picked unit. |
| 06-07-2004, 02:36 AM | #4 | |
Quote:
Thanks, that worked awsome. I would give you more rep but it would not let me as I have given you a bunch already lately. One more question, is there a way to change it so It does not bomb buildings as well? |
