It would be useful if the function that is called when a unit is damaged/destroyed would allow access to the unit type id of the thing that fired it. We can all differentiate sniper / artillery / annihilator etc fire when the firer is outside of the LOS, but the AI is not currently able to. For AAI this affects the learning algorithm and I'm sure the other AIs could make use of it for intelligence purposes.
The functions that would need changing are
Code: Select all
UnitDamaged(int damaged,int attacker,float damage,float3 dir)
UnitDestroyed(int unit, int attacker)
Code: Select all
UnitDamaged(int damaged,int attacker,int aunittype, float damage,float3 dir)
UnitDestroyed(int unit, int attacker, int aunittype, float3 dir)
Code: Select all
UnitDamaged(int damaged,int attacker,int aunittype, float damage, bool destroyed, float3 dir)
All comments appreciated, esp from actual AI devs![/code]