StartAnim: Difference between revisions
Jump to navigation
Jump to search
Automatyczna aktualizacja dokumentacji funkcji |
Complete Lua function catalog |
||
| Line 35: | Line 35: | ||
* Use <code>stopAnim</code> to cancel a looping scripted animation. | * Use <code>stopAnim</code> to cancel a looping scripted animation. | ||
[[Category:Lua Functions]] | |||
[[Category:Server Functions]] | [[Category:Server Functions]] | ||
[[Category:Animation Functions]] | [[Category:Animation Functions]] | ||
[[Category:Experimental Lua API]] | [[Category:Experimental Lua API]] | ||
Revision as of 09:55, 15 August 2026
startAnim
Requests a named visual animation on a player's client.
Syntax
bool startAnim(int playerId, string animation [, bool looped = false, number blendSeconds = 0.15])
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
playerId |
int |
yes | The connected player identifier. |
animation |
string |
yes | A safe animation alias supported by the native runtime. |
looped |
bool |
no | Whether the requested visual should loop; defaults to false. |
blendSeconds |
number |
no | Blend duration from 0 to 2 seconds; defaults to 0.15. |
Returns
Returns true when the validated runtime action is accepted and queued; otherwise returns false.
Examples
Play a non-looping wave animation:
startAnim(playerId, "wave", false, 0.2)
Notes
- Available only in server-side resource scripts.
- Experimental: the transport contract is validated, but only native-supported animation aliases are safe. Arbitrary Unreal asset paths are not accepted.
- Use
stopAnimto cancel a looping scripted animation.