Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (86,309 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

Sign in to follow this  
elsewhat

Animation flags

Recommended Posts

elsewhat

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 - DESCRIPTION00000000000000000000000000000001 - 1 - Must be set if you provide duration to TASK_PLAY_ANIM00000000000000000000000000000010 - 2 - ?00000000000000000000000000000100 - 4 - ?00000000000000000000000000001000 - 8 - ?00000000000000000000000000010000 - 16 - Only upper body animation00000000000000000000000000100000 - 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 moves00000000000000000000000100000000 - 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

Share this post


Link to post
Share on other sites
jedijosh920

8 = play normally

9 = loop

 

48 = play normally only upper body

49 = loop only upper body

 

u can mix and match anims ;)

Share this post


Link to post
Share on other sites
jedijosh920

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

Share this post


Link to post
Share on other sites
House of Rushton

Can somebody explain a flag animation for a stupid new fish to modding?

I'm looking to go deep with animations for Machinima

Share this post


Link to post
Share on other sites
ffzero58

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)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.