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}} {{..." |
FlyingFork (talk | contribs) No edit summary |
||
Line 12: | Line 12: | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua> | |||
print("NPC Name: " .. GetNPCPropertyValue(npc, "npc:name")) | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{Template:NPCFunctions}} |
Latest revision as of 14:24, 26 June 2021
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
- GetStreamedNPC
- GetNPCLocation
- SetNPCOutline
- SetNPCPropertyValue
- GetNPCPropertyValue
- CreateNPC
- DestroyNPC
- IsValidNPC
- GetAllNPC
- GetNPCCount
- IsNPCStreamedIn
- SetNPCLocation
- GetNPCLocation
- SetNPCHealth
- GetNPCHealth
- SetNPCAnimation
- SetNPCHeading
- GetNPCHeading
- SetNPCTargetLocation
- SetNPCFollowPlayer
- SetNPCFollowVehicle
- SetNPCRagdoll
- SetNPCRespawnTime