Returns whether the player is close enough to a unit for certain types of interaction
See also Unit functions.
Signature:
canInteract
=
CheckInteractDistance("unit",
distIndex)
Arguments:
unit
- A unit to query (string
, unitID)distIndex
- Number identifying one of the following action types (number
)1
- Inspect2
- Trade3
- Duel4
- Follow
Returns:
canInteract
- 1 if the player is close enough to the other unit to perform the action; otherwise nil (1nil
)