Open77.animations.current(entity)
The clip a body is currently playing.
Returns false when it is playing nothing — which is a state, not an error.
Returns
- clip name, or false
- reason, when applicable
Registered in ResourceHost.cpp as LuaAnimationCurrent (line 6720).
Open77.animations.play(entity, animation)
Plays a named animation on a body.
Does not work on the local player: their body cannot hold a workspot. Use Open77.animations.playSelf for that, which stands a double in for them.
Parameters
- entityentityrequired
- animationstringrequired
Returns
- true on success, otherwise false
- reason for the refusal
Example
local ok, reason = Open77.animations.play(entityId, "emote_smoke")
if not ok then print("refused: " .. reason) end
Registered in ResourceHost.cpp as LuaAnimationPlay (line 6716).
Open77.animations.playSelf(animation, [thirdPerson])
Plays an emote on the local player, through a stand-in body.
The player's own body cannot hold a workspot, so an invisible double takes their place for the length of the clip. This is a separate call rather than play with the player's id because the mechanism is genuinely different.
Parameters
- animationstringrequired
- thirdPersonbooleanoptional
Returns
- true on success, otherwise false
- reason for the refusal
Registered in ResourceHost.cpp as LuaSelfEmotePlay (line 6717).
Open77.animations.stop(entity)
Stops whatever a body is playing and releases what was set up for it.
Stops the workspot animation currently managed by Open77 for the selected body and releases its native animation state. It does not claim or stop arbitrary game animations that Open77 does not own.
Returns
- true on success, otherwise false
- reason for the refusal
Registered in ResourceHost.cpp as LuaAnimationStop (line 6719).
Open77.animations.stopSelf()
Stops the local player's emote and removes the stand-in.
Ends the local-player emote created by playSelf and removes its stand-in body. Cleanup is idempotent and is also performed when the owning resource generation stops.
Returns
- true on success, otherwise false
- reason for the refusal
Registered in ResourceHost.cpp as LuaSelfEmoteStop (line 6718).