Difference between revisions of "TASK PLAY ANIM WITH ADVANCED FLAGS"

From GTAMods Wiki
Jump to navigation Jump to search
(Function description and limited flag effects)
(No difference)

Revision as of 18:41, 12 January 2015

TASK_PLAY_ANIM_WITH_ADVANCED_FLAGS
Number of parameters: 9
Parameter #TypeDescription
1.Ped handle (int)The handle of the ped
2.char pointerThe animation's name
3.char pointerThe animation's set/group name
4.floatPlayback speed?
5.boolflag 1
6.boolflag 2
7.boolflag 3
8.boolflag 4
9.boolflag 5
10.boolflag 6
11.boolflag 7
12.intunknown
Return value:
TypeDescription
None

Description

Makes a character play an animation. The behavior of the character can be controlled with flags.

Notes:Apparently the last parameter must always be 0 or a negative integer. 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

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. Disables player control.
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.