|Description:||Calculates a ground position from a given position and (view) direction, and returns the nearest object to that position. Obstructions from buildings and walls are not considered by this function.|
|Syntax:||[pos, dir, ignore, range, type] call fn_vbs_getLockTarget|
|Return Value:||PositionASL or Object - If no object is found within the specified filter criteria, the ground position the camera points at is returned. If a qualified object is found, then it is returned instead.|
When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Functions A-Z.
_target = [getPosASL player,[0,1,-.05]] call fn_vbs_getLockTarget