Player::playAnimation: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
mNo edit summary
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Starts animation
Starts animation
==Parameters==
==Parameters==
* '''dist: <span style="color:#008017>String</span>'''
* '''dict: <span style="color:#008017>String</span>'''
* '''name: <span style="color:#008017>String</span>'''
* '''name: <span style="color:#008017>String</span>'''
* '''speed: <span style="color:#008017>Number</span>'''
* '''speed: <span style="color:#008017>Number</span>'''
Line 7: Line 7:




*'''[[Animations|Animations list]]'''
 
'''[[Animations|Animations list]]'''




Line 29: Line 30:


==Syntax==
==Syntax==
<div class="header" style="background-color: #408DAE; color: #FFFFFF; border: 2px solid #408DAE;">
<pre>
<div style="margin: 10px 10px 10px 10px;"><b>Server-Side</b></div>
player.playAnimation(dict, name, speed, flag)
<syntaxhighlight lang="javascript">
</pre>
player.playAnimation(dist, name, speed, flag)
</syntaxhighlight>
</div>


==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}}

Latest revision as of 12:06, 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(dict, name, speed, flag)

Example

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

See Also