Open springraaar opened 2 weeks ago
then i could make a gadget that adds a 3 state button to unit UI to control avoidance states:
Spring.SetUnitWeaponState(unitID, weaponNum, "avoidFlags", 123)
exists
Thanks, i'll test these soon and likely close this issue.
Doc still needs to be updated, though.
If it works fine according to your purposes then please rename to "add docs" instead of closing
engine : any, including 105.1.1-2511-g747f18b BAR105
consider these situations: A unit builds a wall (neutral) or dragons teeth (feature)....
nearby enemy does not have the corresponding avoidances enabled so keeps trying to fire at it, wasting its burst and/or DPS on the wall (dumb behavior if DPS < wall toughness/repairability )
nearby enemy has the corresponding avoidances enabled so it stops firing completely, creating a stalemate unless it's moved to get a clear line of fire or manually ordered to target the wall (dumb behavior if DPS >> wall toughness/repairability )
A way to improve this would be to let the controller toggle whether the units try to shoot through neutrals/features or not to hit enemies.
The engine should let the avoidance properties (avoidFriendly, avoidFeature, avoidNeutral, avoidGround, avoidCloaked) be dynamically modified through SetUnitWeaponState or SetUnitWeaponDamages the same way these other properties are:
https://beyond-all-reason.github.io/spring/ldoc/modules/SyncedCtrl.html#states https://beyond-all-reason.github.io/spring/ldoc/modules/SyncedCtrl.html#damages