OnNPCChangeDimension: Difference between revisions

From Onset Developer Wiki
(Created page with "{{Info|Event|Server|1.2.2}} {{FuncDescription|Event called when an NPC instance changes dimensions from SetNPCDimension.}} {{FuncSyntax|OnNPCChangeDimension(npc, old_dim...")
 
No edit summary
 
Line 13: Line 13:
<syntaxhighlight lang="Lua">
<syntaxhighlight lang="Lua">
AddEvent("OnNPCChangeDimension", function(npc, old_dimension, new_dimension)
AddEvent("OnNPCChangeDimension", function(npc, old_dimension, new_dimension)
print("Object "..npc.." changed dimensions")
print("NPC "..npc.." changed dimensions")
end)
end)
</syntaxhighlight>
</syntaxhighlight>

Latest revision as of 10:06, 19 September 2020

OnNPCChangeDimension

Type: Event
Context: Server
Introduced: v1.2.2

Description

Event called when an NPC instance changes dimensions from SetNPCDimension.

Syntax

OnNPCChangeDimension(npc, old_dimension, new_dimension)

Parameters

  • npc
    The npc which changed dimension.
  • old_dimension
    The old dimension.
  • new_dimension
    The new dimension.

Example

AddEvent("OnNPCChangeDimension", function(npc, old_dimension, new_dimension)
	print("NPC "..npc.." changed dimensions")
end)

See also