Here is a snippet of the code I used:-
local tactic = self.attack_units[i]:GetTactic()
local target = tactic.target
aitrace( self.attack_units[i]:GetStats():GetSquadName()..": "..self.attack_units[i]:GetID().." is attacking "..vec2str( target ) )
aitrace("Current target of the attack plan is "..vec2str( self.cc_attack_pos ) )
aitrace("Current gather point of the attack plan is "..vec2str( self.gather_pos ) )
--if the target is not the attack_now_pos, attack_pos or gather_pos then this squad is in use
As you can see I found out the target of the squad in question on the 2nd line with the local variable 'target'. Just compare that with the squad's current position. If they are the same then the squad is not moving since it has reached where it is going to. If they are not the same then the squad still has some moving to do.
Flenser
Edited by Flenser, 13 August 2005 - 04:34 PM.