OnPlayerBodyChange: Difference between revisions
Jump to navigation
Jump to search
Document player appearance change events |
Document Protocol 23 voice and player presentation APIs |
||
| Line 1: | Line 1: | ||
<!-- This page is generated from the verified Lua event definition: onPlayerBodyChange. --> | <!-- This page is generated from the verified Lua event definition: onPlayerBodyChange. --> | ||
= onPlayerBodyChange = | = onPlayerBodyChange = | ||
Triggered after | Triggered after the legacy authoritative body/face profile has changed. | ||
== Availability == | == Availability == | ||
| Line 33: | Line 33: | ||
== Notes == | == Notes == | ||
* | * This compatibility event mirrors <code>onPlayerFaceChange</code>. | ||
* The corresponding reliable visual state is replayed during relevance entry and late join. | * The corresponding reliable visual state is replayed during relevance entry and late join. | ||
Latest revision as of 06:14, 24 August 2026
onPlayerBodyChange
Triggered after the legacy authoritative body/face profile has changed.
Availability
This event is available in server-side scripts.
Callback signature
onPlayerBodyChange(playerId, previousBody, newBody, sourceResource)
Parameters
| Name | Type | Description |
|---|---|---|
playerId |
int |
The affected connected player ID. |
previousBody |
string |
The previous stable body key. |
newBody |
string |
The new stable body key. |
sourceResource |
string |
The resource that requested the change. |
Examples
Handle the event:
addEventHandler("onPlayerBodyChange", root, function(playerId, previousBody, newBody, sourceResource)
outputDebugString(getPlayerName(playerId) .. " body: " .. previousBody .. " -> " .. newBody)
end)
Notes
- This compatibility event mirrors
onPlayerFaceChange. - The corresponding reliable visual state is replayed during relevance entry and late join.