SetAiNavigationBlockerBlocksSight

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search

setAiNavigationBlockerBlocksSight

AVAILABLE FROM UPDATE 0.1.5
This function is available in G1R:MP 0.1.5 and later. The contract below includes the compatibility guarantees introduced in that update.

Sets whether an existing custom navigation blocker also blocks NPC sight and projectiles.

Syntax

setAiNavigationBlockerBlocksSight(blockerId, enabled)

Parameters

Name Type Required Description
blockerId string yes Opaque decimal ID returned by createAiNavigationBlocker, owned by this resource.
enabled bool yes true enables the setting, false disables it.

Returns

Returns true when accepted, false for a rejected request. Acceptance is not proof of a rendered animation, projectile release or hit.

Examples

setAiNavigationBlockerBlocksSight(blockerId, false)

Notes

  • Server-side only. Mutations require the blocker to belong to the calling resource.
  • Since 0.1.5. Use the matching 0.1.5 client and server (Protocol 37).
  • Use matching updated client and server. See NPC scripting for lifecycle, defaults, combat examples and collision limitations.
  • Default blocksSight is true. false makes it navigation-only; it does not disable navigation collision. Only the owning resource may mutate it. Disabled/destroyed blockers do not block sight.