GetAiNavigationBlockerData
getAiNavigationBlockerData
AVAILABLE FROM UPDATE 0.1.2
This function is available in G1R:MP 0.1.2 and later. The contract below includes the compatibility guarantees introduced in that update.
Returns the canonical geometry and state of one blocker owned by the calling resource.
Syntax
table|false getAiNavigationBlockerData(string blockerId)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
blockerId |
string |
yes | The opaque decimal identifier returned by createAiNavigationBlocker. Keep it as a string.
|
Returns
Returns id, ownerResource, enabled, shape="polygon", points, minZ, and maxZ, or false for an unknown, invalid or foreign ID.
Examples
Inspect a blocker's canonical footprint:
local data = getAiNavigationBlockerData(blockerId)
if data then
outputDebugString("vertices=" .. tostring(#data.points))
end
Notes
- Available only in server-side resource scripts.
- Box and cylinder inputs are returned as their conservative canonical convex polygon, so the returned
shapeis always"polygon". - Coordinates are converted back to metres. A resource cannot inspect another resource's blockers through this function.