0605
{{{games}}}
- Description
- Performs an animation on a character
- Syntax
- {{{syntax1}}}
- Parameter
- Native analog
- TASK_PLAY_ANIM
This opcode make the character perform the specified animation. Using this opcode requires 04ED or else the game might crash. Animations from the "PED" file does not need to be loaded.
Parameter 4 is the rate of speed of the animation. 4.0 is the default speed.
Parameter 5 makes the an8imation loop.
Parameter 6 and 7 places the character at the end of the animation instead of returning to the start when the animation finishes.
Parameter 8 locks the character into the last frame of animation.
Parameter 9 is the time in milliseconds before ending the animation. Use -1 to allow the animation to end by itself.
Example
This will show an example on how to make your character perform an animation. This will be only shown as an example and should not be copied verbatim. There are many ways of doing this. The following code uses the Sanny Builder.
:LoadAnim
0247: load_model #BFORI
04ED: load_animation "MISC"
:CheckAnim
0001: wait 0 ms
00D6: if and
0248: model #BFORI available
04EE: animation "MISC" loaded
004D: jump_if_false @CheckAnim
009A: 0@ = create_actor_pedtype 5 model #BFORI at 0.0 0.0 0.0
0605: actor 0@ perform_animation_sequence "BMX_COMEON" IFP_file "MISC" 4.0 loop 0 lockX 0 lockY 0 lockF 0 time -1
0249: release_model #BFORI
04EF: release_animation "MISC"
004E: end_thread
Keywords
perform, animation, actor, character