nanos world API Reference Unofficial documentation
Function Shared Fast

Entity:GetValue

Gets a <a href='/docs/core-concepts/scripting/entity-values'>Value</a> stored on this Entity at the given key. Please refer to <a href="/docs/core-concepts/scripting/entity-values">Entity Values</a> for more information

Syntax

Lua
my_entity:GetValue(key, fallback)

Parameters

Name Type Default Description
key string
fallback any Fallback value if key doesn't exist

Returns

  • any value Value at key or fallback if key doesn't exist