OnNPCDestroyed: Difference between revisions

From Onset Developer Wiki
(Created page with "{{Info|Event|Server|1.2.2}} {{FuncDescription|Event called when a NPC instance was destroyed through DestroyNPC.}} {{FuncSyntax|OnNPCDestroyed(npc)}} {{FuncParameters}}...")
 
(No difference)

Latest revision as of 20:40, 31 August 2020

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