GetAiNavigationBlockers

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 13:52, 4 September 2026 by QCherry (talk | contribs) (Document G1R:MP 0.1.2 navigation collision API)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

getAiNavigationBlockers

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.

Lists every navigation blocker owned by the calling resource.

Syntax

table getAiNavigationBlockers()

Parameters

This function does not accept parameters.

Returns

Returns a deterministic ID-sorted array of canonical blocker tables. The array is empty when the resource owns no blockers.

Examples

Disable every blocker owned by the current resource:

for _, blocker in ipairs(getAiNavigationBlockers()) do
    setAiNavigationBlockerEnabled(blocker.id, false)
end

Notes

  • Available only in server-side resource scripts.
  • Each entry has the same fields as getAiNavigationBlockerData, including disabled blockers.
  • Ownership isolation means the list never exposes blockers created by another resource.