StartAnim
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.