Hello all! I wanted to make a couple AI's that engineer rushed, but they don't seem to use them correctly. They squad up with infantry units, but they just sit outside buildings pretending they have a weapon. Does anyone know if there is a way to code in special behaviors for them? I can't find the AI behavior file, or is it Hardcoded?
Side note: Engineer and Commando aren't in any of the Default AI build ques
Engineer is "E6"
Commando is "RMBO"
If you add those and a % they will produce those units
CNC-TD AI doesn't use Engineer correctly
Engineers brew
https://github.com/OpenRA/OpenRA/issues/3771
https://github.com/OpenRA/OpenRA/issues/4561
are related to this.
https://github.com/OpenRA/OpenRA/issues/4561
are related to this.
-
- Posts: 43
- Joined: Sun May 22, 2011 3:26 pm
Well, I had this brutally working on my HackyAI. And that was dangerous as ****
Code: Select all
if (unit.Info.Name == "e6")
{
var capture = world.FindUnitsInCircle(unit.CenterLocation, Game.CellSize * 6).Where(a1 => !a1.Destroyed && !a1.IsDead() && a1.HasTrait<ITargetable>() && a1.HasTrait<Capturable>() && unit.Owner.Stances[a1.Owner] == Stance.Enemy);
if (!capture.Any())
continue;
var t_capture = capture.ClosestTo(unit.CenterLocation);
if (t_capture == null)
continue;
world.IssueOrder(new Order("CaptureActor", unit, false) { TargetActor = t_capture });
}