Unknown

From DarkAI

AI GET ENTITY TARGET ID

This command will get the id of the target from the specified index in the entity's target list. The target list contains all opponents that have been spotted by this entity including those that have recently disappeared. The list is sorted in order of distance for visible targets, with non-visible targets stored after all visible targets sorted by the time they were last seen. After a few seconds of not being seen a target will be removed from the target list.

If Target Index is not in the range 1 up to and including the value returned by AI Get Entity Count Targets then this command returns 0.

Syntax
return integer = AI Get Entity Target ID ( Entity Number, Target Index )

Parameters
Entity Number, The id of the entity for which you want to retrieve the container.
Target Number, The index of the target from the entity target list you want the id of. Starts at 1.

Return
The id of the target entity or player, 0 if not found.