Warhorse ScripBind documentation
ContentsIndexHome
PreviousUpNext
GetNearestEntitiesOfType
Syntax
C++
int GetNearestEntitiesOfType(IFunctionHandler * pH);
Parameters 
Description 
radius 
radius inside which the entities must be found 
AIObjectType 
AIObject type; see ScriptBindAI.cpp and Scripts/AIAnchor.lua for a complete list of AIObject types available 
maxObjects 
maximum number of objects to find return list - Lua table which will be filled up with the list of the found entities (Lua handlers) (optional) objectFilter - search type filter, which can be the sum of one or more of the following values: 
AIOBJECTFILTER_SAMEFACTION 
AI objects of the same species of the querying object 
AIOBJECTFILTER_SAMEGROUP 
AI objects of the same group of the querying object or with no group AIOBJECTFILTER_NOGROUP :AI objects with Group ID ==AI_NOGROUP AIOBJECTFILTER_INCLUDEINACTIVE :Includes objects which are inactivated. (optional) radius - serch range( default 30m ) 

the number of found entities

Syntax: AI.GetNearestEntitiesOfType( entityId|objectname|position, AIObjectType, maxObjects, returnList [,objectFilter [,radius]] ) 

returns a list of the closest N entities of a given AIObjkect type associated the found objects are then devalued

Copyright (c) 2012. All rights reserved.