Player::taskPlayAnim: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
Line 1: Line 1:
<br><br>float speed &gt; normal speed is 8.0f<br>----------------------<br><br>float speedMultiplier &gt; multiply the playback speed<br>----------------------<br><br>int duration: time in millisecond<br>----------------------<br>-1 _ _ _ _ _ _ _&gt; Default (see flag)<br>0 _ _ _ _ _ _ _ &gt; Not play at all<br>Small value _ _ &gt; Slow down animation speed<br>Other _ _ _ _ _ &gt; freeze player control until specific time (ms) has <br>_ _ _ _ _ _ _ _ _ passed. (No effect if flag is set to be <br>_ _ _ _ _ _ _ _ _ controllable.)<br><br>int flag:<br>----------------------<br>enum eAnimationFlags<br>{<br> ANIM_FLAG_NORMAL = 0,<br>  ANIM_FLAG_REPEAT = 1,<br>  ANIM_FLAG_STOP_LAST_FRAME = 2,<br>  ANIM_FLAG_UPPERBODY = 16,<br>  ANIM_FLAG_ENABLE_PLAYER_CONTROL = 32,<br>  ANIM_FLAG_CANCELABLE = 120,<br>};<br>Odd number : loop infinitely<br>Even number : Freeze at last frame<br>Multiple of 4: Freeze at last frame but controllable<br><br>01 to 15 &gt; Full body<br>10 to 31 &gt; Upper body<br>32 to 47 &gt; Full body &gt; Controllable<br>48 to 63 &gt; Upper body &gt; Controllable<br>...<br>001 to 255 &gt; Normal<br>256 to 511 &gt; Garbled<br>...<br><br>playbackRate:<br><br>values are between 0.0 and 1.0<br><br><br>lockX:  <br><br>0 in most cases 1 for rcmepsilonism8 and rcmpaparazzo_3<br>&gt; 1 for mini@sprunk<br> <br><br>lockY:<br><br>0 in most cases <br>1 for missfam5_yoga, missfra1mcs_2_crew_react<br><br><br>lockZ: <br><br>    0 for single player <br>    Can be 1 but only for MP
'''Speed''':
*Normal speed is <code>8.0f</code>
 
'''Speed Multiplier''': Multiply the playback speed
 
'''Duration''':  
*-1 (Default)
* 0 (No Animation at all)
* Small value (Slows the animation)
* Other values (Freezes  the player till ms was passed) (No effect if flag is set to be controllable.)
 
'''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
 
 
'''PlaybackRate''':
 
*values are between 0.0 and 1.0
 
*'''[[Animations|Animations Dictionary]]'''
 
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">player.taskPlayAnim(animDictionary, animationName, speed, speedMultiplier, duration, flag, playbackRate, lockX, lockY, lockZ);</syntaxhighlight>
<syntaxhighlight lang="javascript">player.taskPlayAnim(animDictionary, animationName, speed, speedMultiplier, duration, flag, playbackRate, lockX, lockY, lockZ);</syntaxhighlight>

Revision as of 08:34, 3 October 2017

Speed:

  • Normal speed is 8.0f

Speed Multiplier: Multiply the playback speed

Duration:

  • -1 (Default)
  • 0 (No Animation at all)
  • Small value (Slows the animation)
  • Other values (Freezes the player till ms was passed) (No effect if flag is set to be controllable.)

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


PlaybackRate:

  • values are between 0.0 and 1.0

Syntax

player.taskPlayAnim(animDictionary, animationName, speed, speedMultiplier, duration, flag, playbackRate, lockX, lockY, lockZ);

Required Arguments

  • animDictionary: String
  • animationName: String
  • speed: float
  • speedMultiplier: float
  • duration: int
  • flag: int
  • playbackRate: float
  • lockX: Boolean
  • lockY: Boolean
  • lockZ: Boolean

Return value

  • Undefined

Example

// todo

See also