GetNPCPropertyValue: Difference between revisions

From Onset Developer Wiki
Created page with "{{Info|Function|Server & Client|1.0}} {{FuncDescription|Gets a property value for this entity.}} {{FuncSyntax|GetNPCPropertyValue(npc, PropertyName)}} {{FuncParameters}} {{..."
 
No edit summary
 
Line 12: Line 12:


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua>
print("NPC Name: " .. GetNPCPropertyValue(npc, "npc:name"))
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
{{Template:NPCFunctions}}

Latest revision as of 14:24, 26 June 2021

GetNPCPropertyValue

Type: Function
Context: Server & Client
Introduced: v1.0

Description

Gets a property value for this entity.

Syntax

GetNPCPropertyValue(npc, PropertyName)

Parameters

  • npc
    The npc identifier
  • PropertyName
    Name of the property variable

Return Value

  • Returns the value.

Example

print("NPC Name: " .. GetNPCPropertyValue(npc, "npc:name"))

See also