Skip to content

Object:GetAttribute

Read attribute for this object.

object:GetAttribute(attribute[, damageClass = 0])

Inputs: attribute is optional an integer attribute ID; damageClass is optional an integer damage class ID (default 0).

Output: Number or nil. Object attribute.

Errors and unavailable states: A wrong receiver or argument type can raise a Lua argument error. An unavailable live read returns nil as described in Output.

See Lua values and game objects for lifetime and enum guidance.