StopAnim: Difference between revisions
Jump to navigation
Jump to search
Complete Lua function catalog |
Document synchronized player animations for update 0.1.2 |
||
| Line 1: | Line 1: | ||
= stopAnim = | = stopAnim = | ||
Stops | <div style="background:#fff5f5; border:1px solid #d13b3b; border-left:5px solid #d13b3b; color:#111111; padding:0.85rem 1rem; margin:0.75rem 0 1rem;"> | ||
<div style="color:#111111; font-weight:bold; letter-spacing:0.04em;">IMPROVED FROM UPDATE 0.1.2</div> | |||
<div style="color:#111111; margin-top:0.25rem;">This function is available in earlier releases and has corrected or expanded behavior in G1R:MP 0.1.2 and later. The contract below describes the updated behavior.</div> | |||
</div> | |||
Stops the tracked scripted visual animation for a connected player and synchronizes the stop with relevant clients. | |||
== Syntax == | == Syntax == | ||
| Line 16: | Line 20: | ||
== Returns == | == Returns == | ||
Returns <code>true</code> when the | Returns <code>true</code> when the server records or retransmits the authoritative stopped state and attempts reliable delivery. This is not a client or transport acknowledgement. Returns <code>false</code> for an invalid player or inactive player session. | ||
== Examples == | == Examples == | ||
| Line 26: | Line 30: | ||
== Notes == | == Notes == | ||
* Available only in server-side resource scripts. | * Available only in server-side resource scripts. | ||
* | * This stops only the scripted animation tracked by <code>startAnim</code>; it does not issue a global montage stop and does not cancel normal replicated locomotion, combat, interaction, hit, or death state. | ||
* Calling <code>stopAnim</code> after an accepted start also supersedes any still-pending client asset load for that older animation state. | |||
[[Category:Lua Functions]] | [[Category:Lua Functions]] | ||
[[Category:Server Functions]] | [[Category:Server Functions]] | ||
[[Category:Animation Functions]] | [[Category:Animation Functions]] | ||
Latest revision as of 16:21, 4 September 2026
stopAnim
IMPROVED FROM UPDATE 0.1.2
This function is available in earlier releases and has corrected or expanded behavior in G1R:MP 0.1.2 and later. The contract below describes the updated behavior.
Stops the tracked scripted visual animation for a connected player and synchronizes the stop with relevant clients.
Syntax
bool stopAnim(int playerId)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
playerId |
int |
yes | The connected player identifier. |
Returns
Returns true when the server records or retransmits the authoritative stopped state and attempts reliable delivery. This is not a client or transport acknowledgement. Returns false for an invalid player or inactive player session.
Examples
Stop a scripted animation:
stopAnim(playerId)
Notes
- Available only in server-side resource scripts.
- This stops only the scripted animation tracked by
startAnim; it does not issue a global montage stop and does not cancel normal replicated locomotion, combat, interaction, hit, or death state. - Calling
stopAnimafter an accepted start also supersedes any still-pending client asset load for that older animation state.