Parameters |
Description |
entityId |
AI's entity id as a center position of the search |
radius |
radius inside which the object must be found. Alternatively a search range can be specified {min=minRad,max=maxRad}. |
AIAnchorType |
Anchor type; see Scripts/AIAnchor.lua for a complete list of Anchor types available |
searchType |
search type filter, which can be one of the following values: ! AIANCHOR_NEAREST: (default) the nearest anchor of the given type ! AIANCHOR_NEAREST_IN_FRONT: the nearest anchor inside the front cone of entity ! AIANCHOR_NEAREST_FACING_AT: the nearest anchor of given type which is oriented towards entity's attention target (...Dejan? ) ! AIANCHOR_RANDOM_IN_RANGE: a random anchor of the given type ! AIANCHOR_NEAREST_TO_REFPOINT: the nearest anchor of given type to the entity's reference point |
(optional) returnPosition |
position of the found object |
(optional) returnDirection |
direction of the found object |
the found Anchor's name (nil if not found)
!
! returns the closest Anchor of a given type around a given entity; ! once an Anchor is found, it's devalued and can't be found again for some seconds (unless specified in flags). ! !
!
!
!
!
!
!
Copyright (c) 2012. All rights reserved.
|