Warhorse ScripBind documentation
ContentsIndexHome
PreviousUpNext
CScriptBind_AI::GetDirectAnchorPos Method
Syntax
C++
int GetDirectAnchorPos(IFunctionHandler* pH);
Parameters 
Description 
entityId 
AI's entity id 
AIAnchorType 
Anchor type; see Scripts/AIAnchor.lua for a complete list of Anchor types available 
maxDist 
search range 

a cover point which can be used to directly attack the attention target, nil if no attack point is available.

!

AI.GetDirectAttackPos(entityId, searchRange, minAttackRange)

! Useful for choosing attack position for RPGs and such.!  

!  

!  

!  

!  

 

Calling the function is quite heavy since it does raycasting.

Copyright (c) 2012. All rights reserved.