1. how to target only mechanical unit with this spell? (by default Matrix is not targeting f.ex building)
2. how to disable unit attack when Def Matrix timer > 0 ?
3. how to set 3 use of this spell (like with Spidermines) ?
my stuff in game hook so far (+ in weapon range i reduce attackk range to 1 - cannot be set to zero)
//Nano robots
if (unit->defensiveMatrixTimer >0) {
//unit->orderToIdle(); this will make unit unable to receive any orders
if(!(units_dat::BaseProperty[unit->id] & UnitProperty::Mechanical)) {
unit->reduceDefensiveMatrixHp(unit->defensiveMatrixHp); // this is zeroing timer if bio unit targeted, not elegant at all
}
if (unit->hitPoints > 0 &&
unit->hitPoints != units_dat::MaxHitPoints[unit->id]) {
unit->setHp(unit->hitPoints + 40);
}
}
//Nano robots
if (unit->defensiveMatrixTimer >0) {
//unit->orderToIdle(); this will make unit unable to receive any orders
if(!(units_dat::BaseProperty[unit->id] & UnitProperty::Mechanical)) {
unit->reduceDefensiveMatrixHp(unit->defensiveMatrixHp); // this is zeroing timer if bio unit targeted, not elegant at all
}
if (unit->hitPoints > 0 &&
unit->hitPoints != units_dat::MaxHitPoints[unit->id]) {
unit->setHp(unit->hitPoints + 40);
}
}
//Nano robots
None.