| 03-08-2007, 08:50 PM | #1 |
In my map, I have monsters set their targets to variables for trigger-driven AI reasons. The problem is that while they have a single hero as their target, it periodically (like every 0.2 seconds) takes all nearby units that are enemies of that monster and stores them in a unit group . I want the units to not be given a new command (i.e. keep attacking uninterrupted) if one of the nearby units stored to the unit group is their current target. So my question is, what "if" statement tells me if a single unit is in a unit group ? |
| 03-08-2007, 09:06 PM | #2 |
In jass you can use this native. JASS:constant native IsUnitInGroup takes unit whichUnit, group whichGroup returns boolean If you are a GUI user, you can find this instruction in a boolean comparison. |
| 03-09-2007, 12:03 AM | #3 |
D'oh, I glossed over it in GUI, thanks though |
