Difference between revisions of "TASK PLAY ANIM WITH ADVANCED FLAGS"
Jump to navigation
Jump to search
(Function description and limited flag effects) |
m |
||
Line 24: | Line 24: | ||
|p11d=flag 7 | |p11d=flag 7 | ||
|p12t=int | |p12t=int | ||
− | |p12d= | + | |p12d=Duration of playback in milliseconds |
|r=0 | |r=0 | ||
}} | }} | ||
Line 32: | Line 32: | ||
Makes a character play an animation. The behavior of the character can be controlled with flags. | Makes a character play an animation. The behavior of the character can be controlled with flags. | ||
− | Notes: | + | Notes: The effects of ''playback_speed'' have not been test but its value varies (observed on the game's scripts) between 8.0 and 10000.0. All tests were done on the player. |
== Flags == | == Flags == | ||
Line 40: | Line 40: | ||
!Observed effect | !Observed effect | ||
|- | |- | ||
− | |1 || Loops the animation infinitely | + | |1 || Loops the animation infinitely if the last parameter is set to anything other than a positive integer. |
|- | |- | ||
|2 || Moves the player and the camera along with the animation. After the playback is done the character returns to its last animation. | |2 || Moves the player and the camera along with the animation. After the playback is done the character returns to its last animation. |
Latest revision as of 19:34, 12 January 2015
Number of parameters: 9 | ||
---|---|---|
Parameter # | Type | Description |
1. | Ped handle (int) | The handle of the ped |
2. | char pointer | The animation's name |
3. | char pointer | The animation's set/group name |
4. | float | Playback speed? |
5. | bool | flag 1 |
6. | bool | flag 2 |
7. | bool | flag 3 |
8. | bool | flag 4 |
9. | bool | flag 5 |
10. | bool | flag 6 |
11. | bool | flag 7 |
12. | int | Duration of playback in milliseconds |
Return value: | ||
Type | Description | |
None |
Description
Makes a character play an animation. The behavior of the character can be controlled with flags.
Notes: The effects of playback_speed have not been test but its value varies (observed on the game's scripts) between 8.0 and 10000.0. All tests were done on the player.
Flags
The following table lists the observed effect of each flag when they are set to true.
Flag | Observed effect |
---|---|
1 | Loops the animation infinitely if the last parameter is set to anything other than a positive integer. |
2 | Moves the player and the camera along with the animation. After the playback is done the character returns to its last animation. |
3 | Same effect as flag number 2 (tested on "idle" from "swimming"). |
4 | If the character moved during the animation, return it (sliding) to the starting point after playback. |
5 | After playback the player is frozen in the last fram of the animation and player control and movement are disabled. |
6 | Same effect as flag number 4 (tested on "idle" from "swimming"). |
7 | If the player moves during the animation freeze the camera until playback is over, then move it behind the player. |