Hi!
Personally, I like the idea of the siege towers being able to capture (of which I see code in their template), however in the game it does not work (at least not for me). To fix this I have changed two little pieces of code in the "UnitAI.js"-component, I hope it is of any use for you.
Just after "// TODO: we should probably only bother syncing projectile attacks, not melee" (it is around line 1896) I changed
var cmpBuildingAI = Engine.QueryInterface(this.entity, IID_BuildingAI);
if (cmpBuildingAI)
cmpBuildingAI.SetUnitAITarget(this.order.data.target);
to
var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
var cmpBuildingAI = Engine.QueryInterface(this.entity, IID_BuildingAI);
if (cmpBuildingAI && !((cmpAttack.GetAttackTypes().indexOf("Capture") != -1) && (this.order.data.attackType == "Capture")) )
cmpBuildingAI.SetUnitAITarget(this.order.data.target);
AND
// BuildingAI has it's own attack-routine
var cmpBuildingAI = Engine.QueryInterface(this.entity, IID_BuildingAI);
if (!cmpBuildingAI)
{
let cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
cmpAttack.PerformAttack(this.order.data.attackType, target);
}
to
// BuildingAI has it's own attack-routine
var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
var cmpBuildingAI = Engine.QueryInterface(this.entity, IID_BuildingAI);
if (!cmpBuildingAI || ((cmpAttack.GetAttackTypes().indexOf("Capture") != -1) && (this.order.data.attackType == "Capture")) )
{
let cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
cmpAttack.PerformAttack(this.order.data.attackType, target);
}
I have tested this, though not extensively, so there might be some unwanted behaviour (buildings are still attacking and siege towers fire arrows at nearby units).