OnNPCDestroyed

From Onset Developer Wiki
Revision as of 20:40, 31 August 2020 by BlueMountains (talk | contribs) (Created page with "{{Info|Event|Server|1.2.2}} {{FuncDescription|Event called when a NPC instance was destroyed through DestroyNPC.}} {{FuncSyntax|OnNPCDestroyed(npc)}} {{FuncParameters}}...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
OnNPCDestroyed

Type: Event
Context: Server
Introduced: v1.2.2

Description

Event called when a NPC instance was destroyed through DestroyNPC.

Syntax

OnNPCDestroyed(npc)

Parameters

  • npc
    The npc which was destroyed.

Example

function OnNPCDestroyed(npc)
    print("NPC "..npc.." was destroyed")
end
AddEvent("OnNPCDestroyed", OnNPCDestroyed)

See also