Line of Fire for Antitank guns


#1

The widget “Attack AoE” shows Line of Fire on tanks but not antitank-guns and tank destroyers. I modified it to show Line of fire/scattering on weapons that are unable to attack the ground.

I copied an elseif statement and added “== false” elseif (weaponDef.canAttackGround == false and not weaponDef.isShield and not ToBool(weaponDef.interceptor) and (weaponDef.areaOfEffect > maxSpread or weaponDef.range * (weaponDef.accuracy + weaponDef.sprayAngle) > maxSpread ) and not string.find(weaponDef.name, "flak")) then maxSpread = max(weaponDef.areaOfEffect, weaponDef.range * (weaponDef.accuracy + weaponDef.sprayAngle)) maxWeaponDef = weaponDef[attachment=0]gui_attack_aoe2.lua[/attachment]
Known side effects/bugs:
Infantry grenade scattering and AoE is shown


#2

Can you zip up all your modified widgets?


#3

I don’t think that I have modified any other widgets other than Attack AoE and Idlebuilders. Edit: Not to the point that they work as intended at least.


#4

What about customformations?


#5

Yeah. True.
I have modified that widget aswell.