| 05-25-2008, 12:41 AM | #1 |
I want to make certain units always stay within a certain radius of another unit and if they stray too far send them back to the original. I also want them to be controllable. It's similar to Vexorian's independent summon system but I want to be able to have the units use spells and be ordered around as long as they stay within a radius. |
| 05-25-2008, 12:52 AM | #2 |
That one is as easy as a loop that checks if the units are in a certain range, if they aren't order the slave to get close to the unit. You can add extravagant things as blocking orders in case the unit is too far, but I don't think that's so necessary. |
| 05-25-2008, 01:23 AM | #3 |
hm a loop? so.. If i was to make this in GUI would the event be periodic? |
| 05-25-2008, 01:28 AM | #4 |
yes something like that |
| 05-25-2008, 01:50 AM | #5 |
I see. Thanks |
| 05-25-2008, 03:59 AM | #6 |
You can also use the default 'follow this unit' behaviour in wc3 by ordering a unit to patrol on another unit. |
| 05-25-2008, 04:09 AM | #7 |
Hm so what your suggesting is that Every X seconds order "slave" patrol to master? Might work but wouldn't there a problem with keeping the unit in range? For example if there were enemy units wouldn't the "slave" stop and fight the unit since it's on patrol? |
| 05-25-2008, 04:21 AM | #8 |
It would follow the master and copy its actions. So if the master attacked, so would the slave. However, if the master stops and isn't necessarily attacking, if there is a unit in range, the slave will probably attack. Oh, and to allow the slave to be able to follow much closer, give it "Tornado Wander" (I think that's the ability, correct me if I'm wrong anyone.) |
| 05-25-2008, 04:44 AM | #9 |
really? I didn't know patrol copied the "master's" actions. Tornado wander would still allow me to command the unit to use spells? |
| 05-25-2008, 04:53 AM | #10 |
Yes, I believe so. |
| 05-25-2008, 07:31 AM | #11 | |
Quote:
You only need to order it once. |
| 05-25-2008, 07:33 AM | #12 |
If the slave breaks patrol and attacks, it would need to be re-ordered. So you should periodically re-order it, to be on the safe side. |
| 05-25-2008, 04:31 PM | #14 |
Now try one that doesn't leak memory like hell. I don't think it will work. There are ways to make the lead move without issuing orders. |
| 05-25-2008, 04:44 PM | #15 |
the trigger code I pasted was a rough draft of what I wanted to do but I decided to use ur independent system without the ward classification. Your system doesn't leak right? =X |
