GetPedAnimation: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
(Undo revision 19853 by Jax (Talk))
Line 2: Line 2:
{{Client function}}
{{Client function}}


Gets the animation data of a player or ped that was set using [[setPedAnimation]] or [[blendPedAnimation]].
Gets the animation of a player or ped that was set using [[setPedAnimation]].


==Syntax==
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
... getPedAnimationData ( ped thePed, string dataType )
string string getPedAnimation ( ped thePed )
</syntaxhighlight>
</syntaxhighlight>


===Required Arguments===
===Required Arguments===
*'''thePed:''' the player or ped you want to get the animation data of.
*'''thePed:''' the player or ped you want to get the animation of.
*'''dataType:''' A string representing the type of data you want to retrieve:
 
==Data-types==
*'''name:''' string - name of animation.
*'''blockName:''' string - name of animation block.
*'''loop:''' boolean - looping.
*'''updatePosition:''' boolean - updating position.
*'''interruptable:''' boolean - interruptable.
*'''time:''' float - duration.
*'''startTime:''' float - starting point.
*'''finished:''' boolean - finished playing.
*'''speed:''' float - speed.
*'''blendSpeed:''' float - blending speed.


===Returns===
===Returns===
Returns various arguments depending on the 'dataType' specified.
Returns two ''strings'': the first is the name of the block, the second is the name of the animation. Returns ''false'' if there was an error or if the ped is not doing an animation.


==Example==
==Example==

Revision as of 17:50, 10 June 2009