OnNpcIdVisibilityChange

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 17:33, 2 September 2026 by QCherry (talk | contribs) (Document the NPC ID visibility event planned for G1R:MP update 0.1.2)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

onNpcIdVisibilityChange

COMING IN UPDATE 0.1.2
This event is documented in advance and is not yet available in the current public release.

Triggered after a resource shows or hides the numeric identifier in a scripted NPC's nameplate.

Availability

This event is available in server-side scripts.

Callback signature

onNpcIdVisibilityChange(npcId, previousVisible, visible, sourceResource)

Parameters

Name Type Description
npcId int The affected NPC identifier.
previousVisible bool Whether the numeric identifier was previously visible.
visible bool Whether the numeric identifier is now visible.
sourceResource string The resource that requested the change.

Examples

Handle the event:

addEventHandler("onNpcIdVisibilityChange", root, function(npcId, previousVisible, visible, sourceResource)
    outputDebugString("NPC " .. npcId .. " numeric ID visible=" .. tostring(visible))
end)

Notes

  • The NPC display name remains visible; only the appended numeric identifier changes.
  • The authoritative setting is replayed during relevance entry and late join.