GetPlayerAnimationInfo
getPlayerAnimationInfo
New server-side function since 0.1.4 BUILD127. See Update 0.1.4 for release status.
Returns catalog metadata for a named player animation. This is a catalog lookup, not the current animation state of a particular player. The expanded animation catalog has been confirmed working in-game by the project owner.
Syntax
table|false getPlayerAnimationInfo(string animation)
Parameters
| Parameter | Description |
|---|---|
animation |
A case-insensitive alias from getPlayerAnimationNames or the Player animation catalog. Unknown or invalid aliases return false. Unreal asset paths are not accepted. |
Return fields
| Field | Type | Meaning |
|---|---|---|
name |
string | Canonical lowercase alias. |
group |
string | work, rest, daily, pose or legacy. Existing work/mine belong to work; the other original 25 aliases belong to legacy. The 91 additions comprise 35 work, 19 rest, 19 daily and 18 pose entries. |
looped |
boolean | Recommended default: true for a hold animation, false for a one-shot. This does not change startAnim's default; pass it explicitly. |
entrySeconds |
number | For new entries, duration of the selected introduction. For original entries, the legacy loop-start metadata. Seconds. |
durationSeconds |
number | For new entries, duration of the selected introduction, one loop and exit. Original entries return 0 because this duration is not provided by this metadata; it does not mean a zero-length animation. |
visualOnly |
boolean | True for the 91 entries using the new controlled presentation path. False identifies the legacy playback path, not permission to perform crafting or alter gameplay state. |
Example
local info = getPlayerAnimationInfo("lieground")
if info then
if not startAnim(playerId, info.name, info.looped, 0.15) then
outputDebugString("Animation request rejected")
end
end
-- When the activity should end:
-- stopAnim(playerId)
These are visual activities; furniture and workstations must be positioned separately. Querying metadata does not change the player. See Player animation catalog for the complete list and startAnim for the request/return-value contract.