I'm looking for ways to select enemy units that are known by the AI and ideally get their location as well.
You can use AIFindUnit() with the enemy player number, but this returns units that the player has not seen yet and would be cheating.
Some of the tactical functions have scangroup enemy passed into them, but I don't know where this comes from.
Other than that AILastAttacker looks like it would return an enemy unit (though just the one), and the UnitGroup function with an appropriate filter looks like it might show some promise.
Has anyone had luck selecting an enemy unit or group? Has anyone found a way to get a unit's location?
Among other things, I'm looking for a non-cheating way to identify the location of enemy expansions so that they can be directly targeted, and for Zerg and Protoss enemies I'm looking to send an Overlord to spy on them until it's no longer safe to do so.
You could just get the location of towns using the enemy player #, but I don't want the AI to cheat.
You can use AIFindUnit() with the enemy player number, but this returns units that the player has not seen yet and would be cheating.
Some of the tactical functions have scangroup enemy passed into them, but I don't know where this comes from.
Other than that AILastAttacker looks like it would return an enemy unit (though just the one), and the UnitGroup function with an appropriate filter looks like it might show some promise.
Has anyone had luck selecting an enemy unit or group? Has anyone found a way to get a unit's location?
Among other things, I'm looking for a non-cheating way to identify the location of enemy expansions so that they can be directly targeted, and for Zerg and Protoss enemies I'm looking to send an Overlord to spy on them until it's no longer safe to do so.
You could just get the location of towns using the enemy player #, but I don't want the AI to cheat.