OnNpcIdVisibilityChange
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.