Difference between revisions of "0372"

From GTAMods Wiki
Jump to navigation Jump to search
(so that's why they crash)
m
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{OpCode
+
{{Icon|3}} {{Icon|VC}} '''SET_CHAR_WAIT_STATE'''
| ini        = 0372=3,%1d% %2d% %3d%
+
<hr />
| description = Plays an animation on an actor
+
'''Description'''
| p1          = Actor handle
+
: Plays an [[IFP|animation]] sequence on a character
| p2          = Animation value
+
'''Syntax'''
| p3          = Time in milliseconds
+
: 0372: set_actor [''char handle''] anim [''int1''] wait_state_time [''int2''] ms
| game        = [[Vice City]]
+
'''Parameter'''
}}
+
: [''char handle'']
This opcode plays an animation on an actor. Some animations can play for a set amount of time but some animations require to be looped in order to work. If played on the player, most animations allow some extent of control as the animations tries to play.
+
:: The handle of the character
 +
: [''int1'']
 +
:: [[#List of animation values|Animation value]]
 +
: [''int2'']
 +
:: Time in milliseconds
  
==List of animation values==
+
This opcode plays an animation sequence on a character. Some animations can play for a set amount of time but some animations require to be looped in order to work. If played on the player, most animations allow some extent of control as the animations are trying to play.
 +
 
 +
== List of animation values ==
 +
GTA III goes up to 20 and Vice City goes up to 35. Both games have similar animations and behaviors.
 
{| {{Prettytable}}
 
{| {{Prettytable}}
 
! Value
 
! Value
! Should<br>be<br>looped?
+
! Should<br />be<br />looped?
! Deviate<br>from<br>position?
+
! Deviate<br />from<br />position?
! Follows<br>time<br>limit?
+
! Follows<br />time<br />limit?
 
! Description
 
! Description
 
! Image
 
! Image
Line 196: Line 203:
 
| No
 
| No
 
| No
 
| No
|  
+
| No
| Kicks the floor; if looped, animation repeats
+
| Kicks or attacks the ground/weak throw projectile, animation depends on weapon (works for slots 0, 1, and 2); if looped, animation repeats
 
| [http://img.photobucket.com/albums/v41/spaceeinstein/0372-33.png Link]
 
| [http://img.photobucket.com/albums/v41/spaceeinstein/0372-33.png Link]
 
|-
 
|-
Line 214: Line 221:
 
| [http://img.photobucket.com/albums/v41/spaceeinstein/0372-35.png Link]
 
| [http://img.photobucket.com/albums/v41/spaceeinstein/0372-35.png Link]
 
|}
 
|}
Some animations requires the opcode to be looped in order to see the animation correctly. Those that should be looped is under the "Should be looped?" column. All animations can be looped but some will look bad or not right. Those that should not be looped is not under that column. Some animations will force the actor to stray away from the original position. Those that does that is under the "Deviate from position?" column.
+
Some animations requires the opcode to be looped in order to see the animation correctly. Those that should be looped is under the "Should be looped?" column. All animations can be looped but some will look bad or not right. Those that should not be looped is not under that column. Some animations will force the character to stray away from the original position. Those that does that is under the "Deviate from position?" column.
  
 
All unlisted values has no effect. Value 6 was used once in the game but the character doesn't seem to do anything unique.
 
All unlisted values has no effect. Value 6 was used once in the game but the character doesn't seem to do anything unique.
  
==Keywords==
+
== Keywords ==
animation, wait state time, play
+
actor, character, animation, wait state, time, play
 +
 
 +
[[Category:OpCodes]]

Latest revision as of 21:15, 10 January 2012

GTA III Vice City SET_CHAR_WAIT_STATE


Description

Plays an animation sequence on a character

Syntax

0372: set_actor [char handle] anim [int1] wait_state_time [int2] ms

Parameter

[char handle]
The handle of the character
[int1]
Animation value
[int2]
Time in milliseconds

This opcode plays an animation sequence on a character. Some animations can play for a set amount of time but some animations require to be looped in order to work. If played on the player, most animations allow some extent of control as the animations are trying to play.

List of animation values

GTA III goes up to 20 and Vice City goes up to 35. Both games have similar animations and behaviors.

Value Should
be
looped?
Deviate
from
position?
Follows
time
limit?
Description Image
0 No No No Resets the animation to normal, similar to 053D
2 Yes No No Stands still with hands behind the back Link
3 No No Yes Leans back and looks left and right; if looped, animation will repeat Link
8 No No Yes Stands still with hands behind the back then scratches head; if looped, hands will be kept behind the back Link
9 No Yes No Bounces and stumbles backwards or forwards Link
10 No No No Turns around 360 degrees
11 No Yes No Bounces, stumbles backwards or forwards, then scratches head Link
12 Yes No No Bends over and catches breath
13 No No No Stands still with hands behind the back for five seconds no matter the limit; if looped, hands will be kept behind the back
14 No No Yes Steps away and bends down as if protecting itself Link
15 No Yes No Surprised while stepping back Link
16 No No Yes Hails a taxi; if set time limit only hails once and keeps in standing pose until time's up; if looped, will keep hailing Link
17 No Yes Yes Steps back then raises both hands; if looped, animation will repeat Link
18 No Yes No Surprised while stepping back
19 No No Yes Various hand gestures suggesting a conversation; if looped, animation will repeat Link
20 Yes No Yes Bends over and catches breath then leans back and looks left and right when it reaches the time limit; if looped will continuously bend over to catch a breath Link
21 No No No Sits down, sits up eventually
23 No No No Stands up from sitting position
24 No No Yes Sits down, looks around, then stands up at the time limit; if looped, will continuously sit down Link
25 No No No Hand gestures suggesting using an ATM; animation will complete itself no matter the limit; if looped, animation repeats Link
28 No No No Sunbathe Link
29 No No No Several animations related to rioting, which includes fist shaking and hollering; note that the animation 'RIOT' has to be loaded through 04ED or else the game will crash!
30 No No No Falls over backwards and will stay fallen on the floor Link
31 No No No Hand gestures suggesting activating a detonator; if looped, animation repeats Link
32 No No No Several animations related to strip dancing; note that the animation 'STRIP' has to be loaded through 04ED or else the game will crash!
33 No No No Kicks or attacks the ground/weak throw projectile, animation depends on weapon (works for slots 0, 1, and 2); if looped, animation repeats Link
34 No No No Slumped over on a chair, was used for Lance beaten up by Diaz's men; note that the animation 'LANCE' has to be loaded through 04ED or else the game will crash!
35 No Yes Yes Steps back then raises both hands up; if looped, animation will repeat Link

Some animations requires the opcode to be looped in order to see the animation correctly. Those that should be looped is under the "Should be looped?" column. All animations can be looped but some will look bad or not right. Those that should not be looped is not under that column. Some animations will force the character to stray away from the original position. Those that does that is under the "Deviate from position?" column.

All unlisted values has no effect. Value 6 was used once in the game but the character doesn't seem to do anything unique.

Keywords

actor, character, animation, wait state, time, play