Player::playAnimation: Difference between revisions

From RAGE Multiplayer Wiki
(Removed 'serverside)
m (Replaced HTML with template)
Line 30: Line 30:


==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">
<pre>
player.playAnimation(dist, name, speed, flag)
player.playAnimation(dist, name, speed, flag)
</syntaxhighlight>
</pre>


==Example==
==Example==
<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;">
{{ServersideCode|
<div style="margin: 10px 10px 10px 10px;"><b>Server-Side</b></div>
<pre>
<syntaxhighlight lang="javascript">
player.playAnimation('mp_arresting', 'idle', 1, 49)
player.playAnimation('mp_arresting', 'idle', 1, 49)
</syntaxhighlight>
</pre>
</div>
}}


==See Also==
==See Also==
{{Player_block}}
{{Player_block}}

Revision as of 12:05, 26 October 2018

Starts animation

Parameters

  • dict: String
  • name: String
  • speed: Number
  • flag: Number


Animations list


Animation Flags :

  • NORMAL = 0,
  • REPEAT = 1,
  • STOP_LAST_FRAME = 2,
  • UPPERBODY = 16,
  • ENABLE_PLAYER_CONTROL = 32,
  • CANCELABLE = 120,
  • Odd number : loop infinitely
  • Even number : Freeze at last frame
  • Multiple of 4: Freeze at last frame but controllable
  • 01 to 15 : Full body
  • 10 to 31 : Upper body
  • 32 to 47 : Full body > Controllable
  • 48 to 63 : Upper body > Controllable
  • 001 to 255 : Normal
  • 256 to 511 : Garbled

Syntax

player.playAnimation(dist, name, speed, flag)

Example

Server-Side
player.playAnimation('mp_arresting', 'idle', 1, 49)

See Also