However this table is global to InfantryTactic class meaning it is not duplicated for each instanciated squad.
Using a global table for things such as ability name, ID and filter make sense but for timer it does not.
Timer is stored in 5th position in the table (refer to InfantryTactic:DoAbilities() )
At the moment when a squad use an ability since there is only one timer for all the squads this ability is locked for all of them.
EG : SM Tactical squad + frag grenades.
If squad A launch grenade at time = 9s, squad B will not be able to launch a grenade untill time + 5 = 14s in game because of squad A according to function InfantryTactic:DoAbilities()
In order to prevent multiple attack bug for one squad, ability usage has been potentially disabled for all the squad of this kind.
I think it could be easily solved by relocating the Target ability table into constructor (name and ID will be duplicated but each squad will be able to use the ability)
It really shows for abilities used by great number of squads such as infantry grenade, when using a target ability table for each AI uses grenades very often.
Moreover the delay of 5 seconds shall not be hardcoded but customized for each ability, eg timer for frag grenades is 25s and timer for smite is... well something else
Unfortunately there is no way to retrieve this info using lua code i guess
Edited by troubadour, 21 August 2009 - 09:06 AM.