GetPlayerAnimationNames

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search

getPlayerAnimationNames

New server-side function since 0.1.4 BUILD127. Requires the 0.1.4 server; the additional animations also require the matching client. See Update 0.1.4 for release status.

Returns the animation aliases supported by the running server. BUILD127 contains 118 aliases: 27 existing entries and 91 additions. The animations have been confirmed working in-game by the project owner.

Syntax

table getPlayerAnimationNames()

Returns

A fresh, 1-based array of strings in catalog order. Changing this Lua table does not change the server catalog. Use the aliases, not array positions, in scripts. See Player animation catalog for the complete list and getPlayerAnimationInfo for metadata.

Example

for _, name in ipairs(getPlayerAnimationNames()) do
    local info = getPlayerAnimationInfo(name)
    if info.group == "work" then
        outputDebugString(name)
    end
end

Listing names does not start an animation or change player state. Use startAnim and stopAnim to control playback.