Difference between revisions of "0605"
Jump to navigation
Jump to search
m |
|||
Line 1: | Line 1: | ||
{{OpCode | {{OpCode | ||
− | | | + | | games = {{Icon|SA}} |
− | | description = Performs | + | | command = TASK_PLAY_ANIM |
− | | | + | | description = Performs the [[animation]] on the character |
− | | | + | | syntax1 = 0605: actor [''char handle''] perform_animation "[''string1'']" IFP "[''string2'']" framedelta [''flt''] loop [''int1''] lockX [''int2''] lockY [''int3''] lockF [''int4''] time [''int5''] |
− | | | + | | p1t = [''char handle''] |
− | | | + | | p1d = The handle of the character |
− | | | + | | p2t = [''string1''] |
− | | | + | | p2d = Animation sequence |
− | | | + | | p3t = [''string2''] |
− | | | + | | p3d = Animation file |
− | | | + | | p4t = [''flt''] |
− | | | + | | p4d = Rate of speed of animation (default 4.0) |
− | | | + | | p5t = [''int1''] |
+ | | p5d = Allows animation to loop | ||
+ | | p6t = [''int2''] | ||
+ | | p6d = Allows character to remain at x-coordinate when animation ends | ||
+ | | p7t = [''int3''] | ||
+ | | p7d = Allows character to remain at y-coordinate when animation ends | ||
+ | | p8t = [''int4''] | ||
+ | | p8d = Locks character into last frame of animation | ||
+ | | p9t = [''int5''] | ||
+ | | p9d = Duration in milliseconds, ''-1'' to allow animation to end by itself | ||
}} | }} | ||
− | |||
− | + | This opcode makes the character perform the specified animation. With the exception of the "PED" animation file, using this opcode requires [[04ED]] or else the game may crash. | |
− | |||
− | |||
− | |||
− | |||
==Example== | ==Example== | ||
− | + | The following example using [[Sanny Builder]] allows a character to perform an animation. | |
− | < | + | <syntaxhighlight lang="scm"> |
− | + | 0247: load_model #BFORI | |
− | + | 04ED: load_animation "MISC" | |
− | + | 038B: load_requested_models | |
− | + | 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" | |
− | + | </syntaxhighlight> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | </ | ||
==Keywords== | ==Keywords== |
Latest revision as of 11:44, 10 November 2016
- Description
- Performs the animation on the character
- Syntax
- 0605: actor [char handle] perform_animation "[string1]" IFP "[string2]" framedelta [flt] loop [int1] lockX [int2] lockY [int3] lockF [int4] time [int5]
- Parameter
- [char handle]
- The handle of the character
- [string1]
- Animation sequence
- [string2]
- Animation file
- [flt]
- Rate of speed of animation (default 4.0)
- [int1]
- Allows animation to loop
- [int2]
- Allows character to remain at x-coordinate when animation ends
- [int3]
- Allows character to remain at y-coordinate when animation ends
- [int4]
- Locks character into last frame of animation
- [int5]
- Duration in milliseconds, -1 to allow animation to end by itself
This opcode makes the character perform the specified animation. With the exception of the "PED" animation file, using this opcode requires 04ED or else the game may crash.
Example
The following example using Sanny Builder allows a character to perform an animation.
0247: load_model #BFORI
04ED: load_animation "MISC"
038B: load_requested_models
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"
Keywords
perform, animation, actor, character