Quantcast

Jump to content

» «
Photo

Animation flags

4 replies to this topic
elsewhat
  • elsewhat

    Rat

  • Members
  • Joined: 14 Aug 2015
  • Norway

#1

Posted 09 November 2015 - 07:22 PM

AI::TASK_PLAY_ANIM has an animationFlag parameter. This is binary based, the same way as the driving style is (ref http://gtaforums.com/topic/822314-guide-driving-styles/). 

 

The flags has been tested on a task sequence with multiple animations

AI::TASK_PLAY_ANIM(0, animLibrary, animName, 8.0f, -8.0f, duration, animationFlag, 8.0f, 0, 0, 0);

 

(duration has been found through ENTITY::GET_ENTITY_ANIM_TOTAL_TIME)

FLAG ENABLED - CONVERTED INTEGER - DESCRIPTION
00000000000000000000000000000001 - 1 - Must be set if you provide duration to TASK_PLAY_ANIM
00000000000000000000000000000010 - 2 - ?
00000000000000000000000000000100 - 4 - ?
00000000000000000000000000001000 - 8 - ?
00000000000000000000000000010000 - 16 - Only upper body animation
00000000000000000000000000100000 - 32 - Allow control of player (used in combination with 16).
(if you have task sequence of animations, this seems to play only the first animation)
00000000000000000000000001000000 - 64 - ?
00000000000000000000000010000000 - 128 - Stop animation if player moves
00000000000000000000000100000000 - 256 - Inverted #1 (invertion of animation?)
00000000000000000000001000000000 - 512 - Feet slide slight, could it be a camera animation?
00000000000000000000010000000000 - 1024 - ?
00000000000000000000100000000000 - 2048 - ?
00000000000000000001000000000000 - 4096 - ?
00000000000000000010000000000000 - 8192 - Inverted #2 (arms appear to be inverted)
00000000000000000100000000000000 - 16384 - ?
00000000000000001000000000000000 - 32768 - ?
00000000000000010000000000000000 - 65536 - ?
00000000000000100000000000000000 - 131072 - ?
00000000000001000000000000000000 - 262144 - ? Used in some scripts
  • ffzero58, jedijosh920, InfamousSabre and 2 others like this

jedijosh920
  • jedijosh920

    ⭐⭐⭐⭐⭐

  • Members
  • Joined: 01 Mar 2012
  • United-States

#2

Posted 15 November 2015 - 07:38 PM

8 = play normally

9 = loop

 

48 = play normally only upper body

49 = loop only upper body

 

u can mix and match anims ;)


jedijosh920
  • jedijosh920

    ⭐⭐⭐⭐⭐

  • Members
  • Joined: 01 Mar 2012
  • United-States

#3

Posted 16 November 2015 - 05:38 PM

i know there is a flag for just doing an animation on the left/right arm or any bodypart, anyone know?


House of Rushton
  • House of Rushton

    Player Hater

  • Members
  • Joined: 21 Apr 2015
  • Canada

#4

Posted 27 May 2016 - 02:09 PM

Can somebody explain a flag animation for a stupid new fish to modding?
I'm looking to go deep with animations for Machinima

ffzero58
  • ffzero58

    Ninjaneer

  • Members
  • Joined: 28 Feb 2009
  • None

#5

Posted 28 May 2016 - 12:04 AM

Can somebody explain a flag animation for a stupid new fish to modding?
I'm looking to go deep with animations for Machinima

 

Flag animations just gives you "modes" on how you want the animation to play on the player.

 

Do you know LUA or C# .NET (or programming in general)? This is going to be difficult if you don't.

 

Here's a LUA example of how flags are used (using 48). The below animation can be played in the car and the player will hit the steering wheel with their hand. This also allows you to keep control of the vehicle OR allow Autodrive mods to continue controlling the vehicle while you play animations.

AI.TASK_PLAY_ANIM(playerPed, "[email protected]@[email protected][email protected]_a", "hit_wheel", 2.0, -2.0, -1, , 48, 0, true, false, true)

I'm not very well versed in C# but I believe the same can be acheived using:

Function.Call(Hash.TASK_PLAY_ANIM(playerPed, "[email protected]@[email protected][email protected]_a", "hit_wheel", 2.0, -2.0, -1, , 48, 0, true, false, true);

OR use the following function (there are other versions of this function):

void Tasks::PlayAnimation(System::String ^animDict, System::String ^animName, float blendInSpeed, float blendOutSpeed, int duration, AnimationFlags flags, float playbackRate)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users