| 04-28-2008, 10:29 AM | #1 |
I am making a map, where I'm trying to add a following system: When an enemy unit gets to the acquisition range of a guard unit, the guard runs to the base and returns with others. The problem is, that when the enemy unit gets in acquisition range, the guard just attacks, no matter what I do. I've so far tried stopping the guard unit before the order to walk, setting acquisition range to 0.00 after acquisition, and replacing the guard with another unit without an attack. None of these worked, so any help is apriciated! This is my trigger: Trigger: ![]() Conditions
|
| 04-28-2008, 11:42 AM | #2 |
Instead of : Unit - Bandit Guard 0022 <gen> Acquires a target try an event like: When unit gets in range of another unit. |
| 04-28-2008, 11:53 AM | #3 |
That works, but then I can't refer the to guard unit with a local variable. That's problematic since I plan to add about ten guard units. I would have to make ten triggers. If there's no other way, I'll use it, but I always try to find a polished solution. |
| 04-28-2008, 01:26 PM | #4 |
You can have multiple events. |
| 04-28-2008, 04:03 PM | #5 |
In case I would use "When unit gets in range of another unit" -event: Events are not the problem. The problem is that there is no "the unit that someone approaches" variable. "Triggering unit" refers to the enemyunit, that comes in range, not the guard unit. I would have to make all actions to be executed on a single unit, such as Bandit Guard 0022 <gen>, and make a new trigger for every single guard unit. Events don't even accept local variables, so I must add multiple events anyway. |
| 04-28-2008, 05:46 PM | #6 |
Add the events using triggers and IndexA()s. |
