Page 1 of 1

Request Groupai(simple formation)

Posted: 21 Aug 2006, 17:33
by NOiZE
I would like a group ai, so a army moves @ the speed like the slowest unit.

Posted: 21 Aug 2006, 18:28
by espylaub
This is actually pretty useful, since setting the fast units to guard the slowest one can be counterproductive. Like when your mavs are all trotting behind a mobile jammer and the jammer is the first unit to walk into the enemy's field of fire. And then it dies. And then the Mavs all stop. Just inside the enemy's firing range, and just out of theirs. Argh.

Posted: 21 Aug 2006, 20:39
by Dragon45
It doesnt need an "explicit" group AI (too much hassle to deal with those things) but needs to be bound to spacebar...

shouldn't be hard

Posted: 21 Aug 2006, 22:26
by alik83
this shouldn't be hard to do, in the selectedUnitsAi.cpp file you can try using setMaxSpeed function SJ has added in movetype.h not long ago for units move with ALT/CTRL/Space or whatever pressed; I wanted to test it yesterday but couldn't compile last svn version of spring. Maybe setUnitAcceleration would also be needed so units won't accelerate at different speeds.
And groupAI which will make faster units constantly wait for slower is totaly easy to implement too. In groupAI you could also make units try to move in formation(keep some limited distance between neighbour units) but that might cause problems when obstacles like canyons are on their way.

Posted: 22 Aug 2006, 04:34
by LordMatt
It would also be nice if units set to guard would actually do so, rather than just hiding in the rear.